Exemplo n.º 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;
        }
Exemplo n.º 2
0
 public static void DeleteBreakpoint(TestBreakpoint breakpoint)
 {
     if (breakpoint != null)
     {
         _breakpoints.Remove(breakpoint);
         FireTestBreakpointDeletedEvent(breakpoint, new TestBreakPointArgs());
         WriteToFile();
     }
 }
Exemplo n.º 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();
            }
        }
Exemplo n.º 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);
        }
Exemplo n.º 5
0
 private static void FireTestBreakpointExitEvent(TestBreakpoint testBreakpoint, TestBreakPointArgs args)
 {
     OnTestBreakpointExit?.Invoke(testBreakpoint, args);
 }
Exemplo n.º 6
0
 private static void FireTestBreakpointDeletedEvent(TestBreakpoint testBreakpoint, TestBreakPointArgs args)
 {
     OnTestBreakpointDeleted?.Invoke(testBreakpoint, args);
 }
Exemplo n.º 7
0
 public static void ChangeBreakpointState(TestBreakpoint breakpoint, TestBreakpoint.State newState)
 {
     breakpoint.CurrentState = newState;
     breakpoint.Changed      = DateTime.Now;
     WriteToFile();
 }