コード例 #1
0
        /// <summary>
        /// Logs stack events of an iteration
        /// </summary>
        /// <param name="stackEvents">List of stack events.</param>
        /// <param name="testCase">This parameter stores the test case related data.</param>
        /// <param name="iteration">This parameter stores the current iteration number.</param>
        public void LogStackEvents(List <StackEvent> stackEvents, TestCase testCase, int iteration)
        {
            if (stackEvents != null &&
                stackEvents.Count != 0 &&
                iteration != TestCases.TestSetupIteration &&
                iteration != TestCases.TestCleanupIteration
                )
            {
                StackEvent[] stackEventsArray = new StackEvent[stackEvents.Count];
                stackEvents.CopyTo(stackEventsArray);

                TestEvent testEvent = new TestEvent();
                testEvent.TestId = testCase.TestId;

                testEvent.Iteration   = iteration;
                testEvent.EventType   = TestEventType.StackEvents;
                testEvent.Timestamp   = DateTime.UtcNow;
                testEvent.StackEvents = stackEventsArray;
                LogEvent(testEvent);
            }
        }
コード例 #2
0
ファイル: Logger.cs プロジェクト: yuriik83/UA-.NET
        /// <summary>
        /// Logs stack events of an iteration
        /// </summary>
        /// <param name="stackEvents">List of stack events.</param>
        /// <param name="testCase">This parameter stores the test case related data.</param>
        /// <param name="iteration">This parameter stores the current iteration number.</param>
        public void LogStackEvents(List<StackEvent> stackEvents, TestCase testCase, int iteration)
        {
            if (stackEvents != null &&
                stackEvents.Count != 0 &&
                iteration != TestCases.TestSetupIteration &&
                iteration != TestCases.TestCleanupIteration
                )
            {
                StackEvent[] stackEventsArray = new StackEvent[stackEvents.Count];
                stackEvents.CopyTo(stackEventsArray);

                TestEvent testEvent = new TestEvent();
                testEvent.TestId = testCase.TestId;

                testEvent.Iteration = iteration;
                testEvent.EventType = TestEventType.StackEvents;
                testEvent.Timestamp = DateTime.UtcNow;
                testEvent.StackEvents = stackEventsArray;
                LogEvent(testEvent);
            }
        }