use of nl.tudelft.watchdog.core.logic.breakpoint.BreakpointChangeType in project watchdog by TestRoots.
the class BreakpointChangeClassifierTest method testClassifyBPDisabled.
@Test
public void testClassifyBPDisabled() {
Breakpoint old = createBreakpoint();
Breakpoint bp = createBreakpoint();
old.setEnabled(true);
bp.setEnabled(false);
List<BreakpointChangeType> result = BreakpointChangeClassifier.classify(old, bp);
assertEquals(1, result.size());
assertEquals(BreakpointChangeType.DISABLED, result.get(0));
}
use of nl.tudelft.watchdog.core.logic.breakpoint.BreakpointChangeType in project watchdog by TestRoots.
the class BreakpointChangeClassifierTest method testClassifyConditionRemoved.
@Test
public void testClassifyConditionRemoved() {
Breakpoint old = createBreakpoint();
Breakpoint bp = createBreakpoint();
old.setCondition("cond");
bp.setCondition(null);
List<BreakpointChangeType> result = BreakpointChangeClassifier.classify(old, bp);
assertEquals(1, result.size());
assertEquals(BreakpointChangeType.COND_CHANGED, result.get(0));
}
use of nl.tudelft.watchdog.core.logic.breakpoint.BreakpointChangeType in project watchdog by TestRoots.
the class BreakpointChangeClassifierTest method testClassifyConditionEnabled.
@Test
public void testClassifyConditionEnabled() {
Breakpoint old = createBreakpoint();
Breakpoint bp = createBreakpoint();
old.setConditionEnabled(false);
bp.setConditionEnabled(true);
List<BreakpointChangeType> result = BreakpointChangeClassifier.classify(old, bp);
assertEquals(1, result.size());
assertEquals(BreakpointChangeType.COND_ENABLED, result.get(0));
}
use of nl.tudelft.watchdog.core.logic.breakpoint.BreakpointChangeType in project watchdog by TestRoots.
the class BreakpointChangeClassifierTest method testClassifyOldBPIsNull.
@Test
public void testClassifyOldBPIsNull() {
Breakpoint bp = createBreakpoint();
List<BreakpointChangeType> result = BreakpointChangeClassifier.classify(null, bp);
assertEquals(1, result.size());
assertEquals(BreakpointChangeType.UNKNOWN, result.get(0));
}
use of nl.tudelft.watchdog.core.logic.breakpoint.BreakpointChangeType in project watchdog by TestRoots.
the class BreakpointChangeClassifierTest method testClassifyHCAdded.
@Test
public void testClassifyHCAdded() {
Breakpoint old = createBreakpoint();
Breakpoint bp = createBreakpoint();
old.setHitCount(-1);
bp.setHitCount(1);
List<BreakpointChangeType> result = BreakpointChangeClassifier.classify(old, bp);
assertEquals(1, result.size());
assertEquals(BreakpointChangeType.HC_ADDED, result.get(0));
}
Aggregations