diff --git a/src/test/java/edu/kit/typicalc/model/ConclusionTest.java b/src/test/java/edu/kit/typicalc/model/ConclusionTest.java index 132e09c..bffe92b 100644 --- a/src/test/java/edu/kit/typicalc/model/ConclusionTest.java +++ b/src/test/java/edu/kit/typicalc/model/ConclusionTest.java @@ -17,13 +17,13 @@ import static org.junit.jupiter.api.Assertions.assertEquals; class ConclusionTest { - private static final Map typeAssumptions = new HashMap<>(); - private static final LambdaTerm lambdaTerm = new VarTerm("var"); - private static final Type type = new NamedType("type"); + private static final Map TYPE_ASSUMPTIONS = new HashMap<>(); + private static final LambdaTerm LAMBDA_TERM = new VarTerm("var"); + private static final Type TYPE = new NamedType("type"); @BeforeAll static void setUp() { - typeAssumptions.put(new VarTerm("var2"), new TypeAbstraction(new NamedType("type2"), new ArrayList<>())); + TYPE_ASSUMPTIONS.put(new VarTerm("var2"), new TypeAbstraction(new NamedType("type2"), new ArrayList<>())); } @Test @@ -34,19 +34,19 @@ class ConclusionTest { @Test void getTypeAssumptionsTest() { - Conclusion conclusion = new Conclusion(typeAssumptions, lambdaTerm, type); - assertEquals(typeAssumptions, conclusion.getTypeAssumptions()); + Conclusion conclusion = new Conclusion(TYPE_ASSUMPTIONS, LAMBDA_TERM, TYPE); + assertEquals(TYPE_ASSUMPTIONS, conclusion.getTypeAssumptions()); } @Test void getLambdaTermTest() { - Conclusion conclusion = new Conclusion(typeAssumptions, lambdaTerm, type); - assertEquals(lambdaTerm, conclusion.getLambdaTerm()); + Conclusion conclusion = new Conclusion(TYPE_ASSUMPTIONS, LAMBDA_TERM, TYPE); + assertEquals(LAMBDA_TERM, conclusion.getLambdaTerm()); } @Test void getTypeTest() { - Conclusion conclusion = new Conclusion(typeAssumptions, lambdaTerm, type); - assertEquals(type, conclusion.getType()); + Conclusion conclusion = new Conclusion(TYPE_ASSUMPTIONS, LAMBDA_TERM, TYPE); + assertEquals(TYPE, conclusion.getType()); } } diff --git a/src/test/java/edu/kit/typicalc/model/ConstraintTest.java b/src/test/java/edu/kit/typicalc/model/ConstraintTest.java index 66bb6f7..ae97601 100644 --- a/src/test/java/edu/kit/typicalc/model/ConstraintTest.java +++ b/src/test/java/edu/kit/typicalc/model/ConstraintTest.java @@ -10,8 +10,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals; class ConstraintTest { - private static final Type type1 = new TypeVariable(TypeVariableKind.USER_INPUT, 1); - private static final Type type2 = new TypeVariable(TypeVariableKind.TREE, 2); + private static final Type TYPE_1 = new TypeVariable(TypeVariableKind.USER_INPUT, 1); + private static final Type TYPE_2 = new TypeVariable(TypeVariableKind.TREE, 2); @Test void equalsTest() { @@ -20,13 +20,13 @@ class ConstraintTest { @Test void getFirstTest() { - Constraint con = new Constraint(type1,type2); - assertEquals(type1, con.getFirstType()); + Constraint con = new Constraint(TYPE_1, TYPE_2); + assertEquals(TYPE_1, con.getFirstType()); } @Test void getSecondTest() { - Constraint con = new Constraint(type1,type2); - assertEquals(type2, con.getSecondType()); + Constraint con = new Constraint(TYPE_1, TYPE_2); + assertEquals(TYPE_2, con.getSecondType()); } } diff --git a/src/test/java/edu/kit/typicalc/model/SubstitutionTest.java b/src/test/java/edu/kit/typicalc/model/SubstitutionTest.java index 1124ebe..5168228 100644 --- a/src/test/java/edu/kit/typicalc/model/SubstitutionTest.java +++ b/src/test/java/edu/kit/typicalc/model/SubstitutionTest.java @@ -10,8 +10,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals; class SubstitutionTest { - private static final TypeVariable var = new TypeVariable(TypeVariableKind.USER_INPUT, 1); - private static final Type type = new TypeVariable(TypeVariableKind.TREE, 2); + private static final TypeVariable VAR = new TypeVariable(TypeVariableKind.USER_INPUT, 1); + private static final Type TYPE = new TypeVariable(TypeVariableKind.TREE, 2); @Test void equalsTest() { @@ -20,13 +20,13 @@ class SubstitutionTest { @Test void getVariableTest() { - Substitution sub = new Substitution(var,type); - assertEquals(var, sub.getVariable()); + Substitution sub = new Substitution(VAR, TYPE); + assertEquals(VAR, sub.getVariable()); } @Test void getTypeTest() { - Substitution sub = new Substitution(var,type); - assertEquals(type, sub.getType()); + Substitution sub = new Substitution(VAR, TYPE); + assertEquals(TYPE, sub.getType()); } } diff --git a/src/test/java/edu/kit/typicalc/model/TypeVariableFactoryTest.java b/src/test/java/edu/kit/typicalc/model/TypeVariableFactoryTest.java index fa7e795..aafacb1 100644 --- a/src/test/java/edu/kit/typicalc/model/TypeVariableFactoryTest.java +++ b/src/test/java/edu/kit/typicalc/model/TypeVariableFactoryTest.java @@ -18,7 +18,7 @@ class TypeVariableFactoryTest { } @Test - void createDistinctTypeVariables_100() { + void createDistinctTypeVariables100() { TypeVariableFactory factory = new TypeVariableFactory(TypeVariableKind.TREE); TypeVariable[] typeVariables = new TypeVariable[100];