#76 - Upgrade to JUnit 5.

This commit is contained in:
Oliver Drotbohm
2021-09-20 16:50:28 +02:00
parent b741a52ddb
commit 183dd383d0
9 changed files with 170 additions and 186 deletions

View File

@@ -1,12 +1,12 @@
/*
* Copyright 2015 the original author or authors.
*
* Copyright 2015-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
*
* https://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -15,37 +15,36 @@
*/
package org.springframework.plugin.metadata;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
import static org.assertj.core.api.Assertions.*;
import org.junit.Test;
import org.junit.jupiter.api.Test;
/**
* Unit tests for {@link SimplePluginMetadata}.
*
*
* @author Oliver Gierke
*/
public class SimplePluginMetadataUnitTest {
class SimplePluginMetadataUnitTest {
/**
* @see #11
*/
@Test
public void equalsIsWorkingCorrectly() {
void equalsIsWorkingCorrectly() {
SimplePluginMetadata nameOneOh = new SimplePluginMetadata("Name", "1.0");
SimplePluginMetadata sameNameOneOh = new SimplePluginMetadata("Name", "1.0");
SimplePluginMetadata nameTwoOh = new SimplePluginMetadata("Name", "2.0");
SimplePluginMetadata anotherNameOneOh = new SimplePluginMetadata("AnotherName", "1.0");
assertThat(nameOneOh, is(nameOneOh));
assertThat(nameOneOh, is(sameNameOneOh));
assertThat(sameNameOneOh, is(nameOneOh));
assertThat(nameOneOh).isEqualTo(nameOneOh);
assertThat(nameOneOh).isEqualTo(sameNameOneOh);
assertThat(sameNameOneOh).isEqualTo(nameOneOh);
assertThat(nameOneOh, is(not(nameTwoOh)));
assertThat(nameTwoOh, is(not(nameOneOh)));
assertThat(nameOneOh).isNotEqualTo(nameTwoOh);
assertThat(nameTwoOh).isNotEqualTo(nameOneOh);
assertThat(nameOneOh, is(not(anotherNameOneOh)));
assertThat(anotherNameOneOh, is(not(nameOneOh)));
assertThat(nameOneOh).isNotEqualTo(anotherNameOneOh);
assertThat(anotherNameOneOh).isNotEqualTo(nameOneOh);
}
}