Skip to content

Commit

Permalink
test: migrate CloneReferenceTest to JUnit 5 (#4474)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWitt authored Jan 12, 2022
1 parent 2595d9d commit 60c39d1
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/test/java/spoon/test/reference/CloneReferenceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@
*/
package spoon.test.reference;

import org.junit.Test;

import java.util.Arrays;
import java.util.List;
import java.util.function.Predicate;

import org.junit.jupiter.api.Test;
import spoon.Launcher;
import spoon.reflect.declaration.CtClass;
import spoon.reflect.declaration.CtElement;
Expand All @@ -25,12 +30,8 @@
import spoon.reflect.reference.CtVariableReference;
import spoon.reflect.visitor.CtScanner;

import java.util.Arrays;
import java.util.List;
import java.util.function.Predicate;

import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertSame;
import static org.junit.jupiter.api.Assertions.assertNotSame;
import static org.junit.jupiter.api.Assertions.assertSame;

public class CloneReferenceTest {

Expand Down Expand Up @@ -61,7 +62,7 @@ public void testGetDeclarationAfterClone() {
CtVariable var1 = findVariable(b, name);
CtVariableReference refVar1 = findReference(b, name);
CtVariable var2 = refVar1.getDeclaration();
assertSame("Var1 and var2 are not the same element", var1, var2);
assertSame(var1, var2, "Var1 and var2 are not the same element");
}
}

Expand Down

0 comments on commit 60c39d1

Please sign in to comment.