use of nl.tudelft.watchdog.core.logic.breakpoint.Breakpoint in project watchdog by TestRoots.
the class BreakpointChangeClassifierTest method testClassifyThreeChanges.
@Test
public void testClassifyThreeChanges() {
Breakpoint old = createBreakpoint();
Breakpoint bp = createBreakpoint();
old.setEnabled(true);
bp.setEnabled(false);
old.setHitCount(1);
bp.setHitCount(-1);
old.setSuspendPolicy(0);
bp.setSuspendPolicy(1);
List<BreakpointChangeType> results = BreakpointChangeClassifier.classify(old, bp);
assertEquals(3, results.size());
assertTrue(results.contains(BreakpointChangeType.DISABLED));
assertTrue(results.contains(BreakpointChangeType.HC_REMOVED));
assertTrue(results.contains(BreakpointChangeType.SP_CHANGED));
}
use of nl.tudelft.watchdog.core.logic.breakpoint.Breakpoint in project watchdog by TestRoots.
the class BreakpointChangeClassifierTest method testClassifyNewBPIsNull.
@Test
public void testClassifyNewBPIsNull() {
Breakpoint bp = createBreakpoint();
List<BreakpointChangeType> result = BreakpointChangeClassifier.classify(bp, null);
assertEquals(1, result.size());
assertEquals(BreakpointChangeType.UNKNOWN, result.get(0));
}
use of nl.tudelft.watchdog.core.logic.breakpoint.Breakpoint in project watchdog by TestRoots.
the class BreakpointChangeClassifierTest method testClassifyHCChanged.
@Test
public void testClassifyHCChanged() {
Breakpoint old = createBreakpoint();
Breakpoint bp = createBreakpoint();
old.setHitCount(1);
bp.setHitCount(2);
List<BreakpointChangeType> result = BreakpointChangeClassifier.classify(old, bp);
assertEquals(1, result.size());
assertEquals(BreakpointChangeType.HC_CHANGED, result.get(0));
}
use of nl.tudelft.watchdog.core.logic.breakpoint.Breakpoint in project watchdog by TestRoots.
the class BreakpointChangeClassifierTest method testClassifyConditionAdded.
@Test
public void testClassifyConditionAdded() {
Breakpoint old = createBreakpoint();
Breakpoint bp = createBreakpoint();
old.setCondition(null);
bp.setCondition("cond");
List<BreakpointChangeType> result = BreakpointChangeClassifier.classify(old, bp);
assertEquals(1, result.size());
assertEquals(BreakpointChangeType.UNKNOWN, result.get(0));
}
use of nl.tudelft.watchdog.core.logic.breakpoint.Breakpoint in project watchdog by TestRoots.
the class BreakpointChangeClassifierTest method testClassifyTwoChanges.
@Test
public void testClassifyTwoChanges() {
Breakpoint old = createBreakpoint();
Breakpoint bp = createBreakpoint();
old.setEnabled(false);
bp.setEnabled(true);
old.setHitCount(-1);
bp.setHitCount(1);
List<BreakpointChangeType> results = BreakpointChangeClassifier.classify(old, bp);
assertEquals(2, results.size());
assertTrue(results.contains(BreakpointChangeType.ENABLED));
assertTrue(results.contains(BreakpointChangeType.HC_ADDED));
}
Aggregations