Search in sources :

Example 31 with Breakpoint

use of nl.tudelft.watchdog.core.logic.breakpoint.Breakpoint in project watchdog by TestRoots.

the class BreakpointCreatorTest method testCreateJavaLineBreakpointCondition.

@Test
public void testCreateJavaLineBreakpointCondition() throws CoreException {
    IJavaLineBreakpoint bp = mock(IJavaLineBreakpoint.class);
    when(bp.getCondition()).thenReturn("cond");
    Breakpoint result = BreakpointCreator.createBreakpoint(bp);
    assertEquals("cond", result.getCondition());
}
Also used : Breakpoint(nl.tudelft.watchdog.core.logic.breakpoint.Breakpoint) IBreakpoint(org.eclipse.debug.core.model.IBreakpoint) IJavaLineBreakpoint(org.eclipse.jdt.debug.core.IJavaLineBreakpoint) IJavaBreakpoint(org.eclipse.jdt.debug.core.IJavaBreakpoint) IJavaLineBreakpoint(org.eclipse.jdt.debug.core.IJavaLineBreakpoint) Test(org.junit.Test)

Example 32 with Breakpoint

use of nl.tudelft.watchdog.core.logic.breakpoint.Breakpoint in project watchdog by TestRoots.

the class BreakpointCreatorTest method testCreateBreakpointHitCount.

@Test
public void testCreateBreakpointHitCount() {
    IBreakpoint bp = mock(IBreakpoint.class);
    Breakpoint result = BreakpointCreator.createBreakpoint(bp);
    assertEquals(-1, result.getHitCount());
}
Also used : Breakpoint(nl.tudelft.watchdog.core.logic.breakpoint.Breakpoint) IBreakpoint(org.eclipse.debug.core.model.IBreakpoint) IJavaLineBreakpoint(org.eclipse.jdt.debug.core.IJavaLineBreakpoint) IJavaBreakpoint(org.eclipse.jdt.debug.core.IJavaBreakpoint) IBreakpoint(org.eclipse.debug.core.model.IBreakpoint) Test(org.junit.Test)

Example 33 with Breakpoint

use of nl.tudelft.watchdog.core.logic.breakpoint.Breakpoint in project watchdog by TestRoots.

the class BreakpointCreatorTest method testCreateJavaLineBreakpointConditionDisabled.

@Test
public void testCreateJavaLineBreakpointConditionDisabled() throws CoreException {
    IJavaLineBreakpoint bp = mock(IJavaLineBreakpoint.class);
    when(bp.isConditionEnabled()).thenReturn(false);
    Breakpoint result = BreakpointCreator.createBreakpoint(bp);
    assertFalse(result.isConditionEnabled());
}
Also used : Breakpoint(nl.tudelft.watchdog.core.logic.breakpoint.Breakpoint) IBreakpoint(org.eclipse.debug.core.model.IBreakpoint) IJavaLineBreakpoint(org.eclipse.jdt.debug.core.IJavaLineBreakpoint) IJavaBreakpoint(org.eclipse.jdt.debug.core.IJavaBreakpoint) IJavaLineBreakpoint(org.eclipse.jdt.debug.core.IJavaLineBreakpoint) Test(org.junit.Test)

Example 34 with Breakpoint

use of nl.tudelft.watchdog.core.logic.breakpoint.Breakpoint in project watchdog by TestRoots.

the class BreakpointCreatorTest method testCreateJavaBreakpointHitCount.

@Test
public void testCreateJavaBreakpointHitCount() throws CoreException {
    IJavaBreakpoint bp = mock(IJavaBreakpoint.class);
    when(bp.getHitCount()).thenReturn(2);
    Breakpoint result = BreakpointCreator.createBreakpoint(bp);
    assertEquals(2, result.getHitCount());
}
Also used : IJavaBreakpoint(org.eclipse.jdt.debug.core.IJavaBreakpoint) Breakpoint(nl.tudelft.watchdog.core.logic.breakpoint.Breakpoint) IBreakpoint(org.eclipse.debug.core.model.IBreakpoint) IJavaLineBreakpoint(org.eclipse.jdt.debug.core.IJavaLineBreakpoint) IJavaBreakpoint(org.eclipse.jdt.debug.core.IJavaBreakpoint) Test(org.junit.Test)

Example 35 with Breakpoint

use of nl.tudelft.watchdog.core.logic.breakpoint.Breakpoint in project watchdog by TestRoots.

the class BreakpointCreatorTest method testCreateBreakpointDisabled.

@Test
public void testCreateBreakpointDisabled() throws CoreException {
    IBreakpoint bp = mock(IBreakpoint.class);
    when(bp.isEnabled()).thenReturn(false);
    Breakpoint result = BreakpointCreator.createBreakpoint(bp);
    assertFalse(result.isEnabled());
}
Also used : Breakpoint(nl.tudelft.watchdog.core.logic.breakpoint.Breakpoint) IBreakpoint(org.eclipse.debug.core.model.IBreakpoint) IJavaLineBreakpoint(org.eclipse.jdt.debug.core.IJavaLineBreakpoint) IJavaBreakpoint(org.eclipse.jdt.debug.core.IJavaBreakpoint) IBreakpoint(org.eclipse.debug.core.model.IBreakpoint) Test(org.junit.Test)

Aggregations

Breakpoint (nl.tudelft.watchdog.core.logic.breakpoint.Breakpoint)38 Test (org.junit.Test)30 BreakpointChangeType (nl.tudelft.watchdog.core.logic.breakpoint.BreakpointChangeType)20 IBreakpoint (org.eclipse.debug.core.model.IBreakpoint)16 IJavaBreakpoint (org.eclipse.jdt.debug.core.IJavaBreakpoint)13 IJavaLineBreakpoint (org.eclipse.jdt.debug.core.IJavaLineBreakpoint)13 Date (java.util.Date)6 XBreakpoint (com.intellij.xdebugger.breakpoints.XBreakpoint)4 BreakpointAddEvent (nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.BreakpointAddEvent)2 BreakpointChangeEvent (nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.BreakpointChangeEvent)2 BreakpointRemoveEvent (nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.BreakpointRemoveEvent)2 XExpression (com.intellij.xdebugger.XExpression)1 CoreException (org.eclipse.core.runtime.CoreException)1 JavaBreakpointProperties (org.jetbrains.java.debugger.breakpoints.properties.JavaBreakpointProperties)1