Commit 46e49350 authored by Johannes Salentin's avatar Johannes Salentin
Browse files

configuration of test plugin

parent 757a0c1b
Pipeline #158108 passed with stages
in 55 seconds
......@@ -74,6 +74,15 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<configuration>
<properties>
<configurationParameters>
junit.jupiter.conditions.deactivate = *
junit.jupiter.extensions.autodetection.enabled = true
junit.jupiter.testinstance.lifecycle.default = per_class
</configurationParameters>
</properties>
</configuration>
</plugin>
</plugins>
</build>
......
package de.example.smells;
import de.example.main.ModelAdapter;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
class TestCyclicDependency {
private ModelAdapter model = new ModelAdapter("Test.xml", null);
private CyclicDependency detector = new CyclicDependency();
private CyclicDependency detector;
@BeforeAll
void init() {
ModelAdapter model = new ModelAdapter("Test.xml", null);
Detector.setModel(model);
detector = new CyclicDependency();
}
@Test
void test() {
Detector.setModel(model);
assertEquals(detector.detect().size(), 3);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment