Commit 3808019f authored by Johannes Salentin's avatar Johannes Salentin
Browse files

extended SmellExample

adapted test and constant
parent 1cfe0f78
Pipeline #160213 passed with stages
in 1 minute and 23 seconds
This diff is collapsed.
......@@ -3,7 +3,7 @@ package de.example.smells;
class Constants {
// Dense Structure
static final double MAX_AVG_DEGREE = 2;
static final double MAX_AVG_DEGREE = 1.75;
// Documentation
static final int MAX_DOCUMENTATION_LENGTH = 256;
......@@ -13,8 +13,8 @@ class Constants {
static final double DUPLICATED_WORDS_RATIO = 0.75;
// Hub-like Modularization
static final int LARGE_FAN_IN = 10;
static final int LARGE_FAN_OUT = 10;
static final int LARGE_FAN_IN = 7;
static final int LARGE_FAN_OUT = 7;
// Message Chain
static final int MAX_SERVICE_CHAIN_LENGTH = 4;
......
......@@ -15,6 +15,7 @@ class TestAmbiguousViewpoint {
Detector.setModel(model);
detector = new AmbiguousViewpoint();
assertEquals(detector.detect().size(), 1);
assertEquals(Detector.getSmells().size(), 1);
}
@Test
......@@ -23,5 +24,6 @@ class TestAmbiguousViewpoint {
Detector.setModel(model);
detector = new AmbiguousViewpoint();
assertEquals(detector.detect().size(), 1);
assertEquals(Detector.getSmells().size(), 1);
}
}
......@@ -22,6 +22,6 @@ class TestDenseStructure {
ModelAdapter model = new ModelAdapter("SmellExample.xml", null);
Detector.setModel(model);
detector = new DenseStructure();
assertEquals(detector.detect().size(), 0);
assertEquals(detector.detect().size(), 1);
}
}
......@@ -22,6 +22,6 @@ class TestHubLikeModularization {
ModelAdapter model = new ModelAdapter("SmellExample.xml", null);
Detector.setModel(model);
detector = new HubLikeModularization();
assertEquals(detector.detect().size(), 0);
assertEquals(detector.detect().size(), 1);
}
}
......@@ -22,6 +22,6 @@ class TestWeakenedModularity {
ModelAdapter model = new ModelAdapter("SmellExample.xml", null);
Detector.setModel(model);
detector = new WeakenedModularity();
assertEquals(detector.detect().size(), 1);
assertEquals(detector.detect().size(), 2);
}
}
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