예제 #1
0
        /// <summary>
        /// Continues script execution from current break location.
        /// </summary>
        public static void ContinueExecution()
        {
            StepOverMode = false;
            ResetEvent.Set();
            ResetEvent.Reset();
            FireTestBreakpointExitEvent(_currentBreakpoint, new TestBreakPointArgs());

            _currentBreakpoint = null;
        }
예제 #2
0
 public static void DeleteBreakpoint(TestBreakpoint breakpoint)
 {
     if (breakpoint != null)
     {
         _breakpoints.Remove(breakpoint);
         FireTestBreakpointDeletedEvent(breakpoint, new TestBreakPointArgs());
         WriteToFile();
     }
 }
예제 #3
0
        public static void EnterBreakpoint(Guid testScriptObjectId)
        {
            _breakpoints = _breakpoints ?? new List <TestBreakpoint>();

            var testBreakpoint = _breakpoints.Find(x => x.TestScriptObjectID.Equals(testScriptObjectId));

            if (testBreakpoint != null)
            {
                _currentBreakpoint = testBreakpoint;
                FireTestBreakpointEnterEvent(testBreakpoint, new TestBreakPointArgs());
                ResetEvent.WaitOne();
            }
        }
예제 #4
0
        /// <summary>
        /// Inserts a breakpoint for the test script object.
        /// </summary>
        /// <param name="testScriptObject">Test script object</param>
        public static TestBreakpoint InsertBreakpoint(TestScriptObject testScriptObject)
        {
            _breakpoints = _breakpoints ?? new List <TestBreakpoint>();

            var breakpoint = new TestBreakpoint(testScriptObject);

            _breakpoints.Add(breakpoint);

            WriteToFile();

            FireTestBreakpointInsertedEvent(breakpoint, new TestBreakPointArgs());

            return(breakpoint);
        }
예제 #5
0
 private static void FireTestBreakpointExitEvent(TestBreakpoint testBreakpoint, TestBreakPointArgs args)
 {
     OnTestBreakpointExit?.Invoke(testBreakpoint, args);
 }
예제 #6
0
 private static void FireTestBreakpointDeletedEvent(TestBreakpoint testBreakpoint, TestBreakPointArgs args)
 {
     OnTestBreakpointDeleted?.Invoke(testBreakpoint, args);
 }
예제 #7
0
 public static void ChangeBreakpointState(TestBreakpoint breakpoint, TestBreakpoint.State newState)
 {
     breakpoint.CurrentState = newState;
     breakpoint.Changed      = DateTime.Now;
     WriteToFile();
 }