コード例 #1
0
 private void OnTestPassed(TestPassedInfo info)
 {
     lock (this.announcementLock)
     {
         this.announcer(Invariant($"   ^ [PASS] {info.TestDisplayName}: Passed."));
     }
 }
コード例 #2
0
 private void OnTestPassed(TestPassedInfo obj)
 {
     var(startTime, endTime) = GetTestExecutionTime(obj.TestDisplayName, obj.ExecutionTime);
     OnTestCaseEnd(new TestEnd(obj.MethodName, obj.TypeName.Split('.').Last(), obj.TestDisplayName,
                               obj.TestCollectionDisplayName, TestOutcome.Passed, startTime, endTime));
     LogOutput(obj.Output);
 }
コード例 #3
0
 void TestPassedHandler(TestPassedInfo obj)
 {
     adapter.AddResult(new TestResultInfo
     {
         Passed      = true,
         DisplayName = obj.TestDisplayName
     });
 }
コード例 #4
0
        static void OnTestPassed(TestPassedInfo info)
        {
            lock (consoleLock)
            {
            }

            result = 1;
        }
コード例 #5
0
 private static void OnTestPassed(TestPassedInfo info)
 {
     lock (ConsoleLock)
     {
         Console.ForegroundColor = ConsoleColor.Green;
         Console.WriteLine($"[PASS] {info.TestDisplayName}");
         Console.ResetColor();
     }
 }
コード例 #6
0
 private static void OnTestPassed(TestPassedInfo info)
 {
     lock (LoggerLock)
     {
         Console.ForegroundColor = ConsoleColor.Green;
         Console.WriteLine($"[PASSED] {info.TestDisplayName}: {Math.Round(info.ExecutionTime, 3)}s");
         Console.ResetColor();
     }
 }
コード例 #7
0
        /// <summary>
        /// 单项测试通过时
        /// </summary>
        public void OnTestPassed(TestPassedInfo info)
        {
            var assemblyName     = info.Runner.Assembly.GetName().Name;
            var webTesterManager = Application.Ioc.Resolve <WebTesterManager>();

            webTesterManager.UpdateInformation(assemblyName, testInfo => {
                testInfo.Counter.Passed += 1;
                testInfo.Updated();
            });
        }
コード例 #8
0
 private void OnTestPassed(TestPassedInfo info)
 {
     _results.Add(new TestResult
     {
         FullName  = $"{info.TypeName}.{info.MethodName}",
         InnerText = string.Empty,
         IsSuccess = true,
         Name      = info.MethodName
     });
 }
コード例 #9
0
 private static void OnTestPassed(TestPassedInfo info)
 {
     lock (ConsoleLock)
     {
         ++_testsRun;
         Console.ForegroundColor = PassColor;
         Console.Write("."); // terse console output for a passed test with detail going to log only
         WriteLineLogOnly($"... {_testsRun,3}/{_discoveryInfo.TestCasesToRun} [PASS] {info.TestDisplayName}");
     }
 }
コード例 #10
0
 void OnTestPassed(TestPassedInfo info)
 {
     if (settingEnv.Console)
     {
         lock (consoleLock)
             Console.WriteLine("[Passed] {0} / {1}", info.TestDisplayName, info.MethodName);
     }
     //
     passed.Add(info.TestDisplayName);
 }
コード例 #11
0
 void TestPassed(TestPassedInfo tpi)
 {
     if (verbose)
     {
         ConsoleEx.writeLine(ConsoleColor.Green, "{0} - passed", tpi.TestDisplayName);
     }
     else
     {
         ConsoleEx.write(ConsoleColor.Green, ".");
     }
 }
コード例 #12
0
        internal static MethodTestResult FromSuccess(TestPassedInfo info, HashSet <string>?points = default)
        {
            return(new MethodTestResult()
            {
                Passed = true,

                Name = info.TestDisplayName,

                Points = points ?? MethodTestResult.EMPTY_HASH_SET
            });
        }
コード例 #13
0
 private static void OnTestPassed(TestPassedInfo info)
 {
     lock (consoleLock)
     {
         telemetryClient.TrackTrace($"[PASS] {info.TestDisplayName}", SeverityLevel.Information);
         if (info.Output != "")
         {
             telemetryClient.TrackTrace(info.Output, SeverityLevel.Information);
         }
     }
 }
コード例 #14
0
        private static void OnTestPassed(TestPassedInfo info)
        {
            lock (ConsoleLock)
            {
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine("[SUCCESS] {0}", info.TestDisplayName);
                Console.ResetColor();
            }

            _result = 1;
        }
コード例 #15
0
        public void OnTestPassed(TestPassedInfo testPassedInfo)
        {
            var testResult = new TestResult()
            {
                PartitionKey  = _partitionKey,
                RowKey        = testPassedInfo.TestDisplayName,
                ExecutionTime = (double)testPassedInfo.ExecutionTime,
                Status        = "Passed"
            };

            _collector.Add(testResult);
        }
コード例 #16
0
        protected void AssertsTestAddPassedTest(TestPassedInfo info)
        {
            var assemblyLocation = "abc.dll";
            var sut = new Result(assemblyLocation);

            Assert.Empty(sut.PassedTests);

            sut.AddPassedTest(info);
#if NET35
            Assert.Equal(1, sut.PassedTests.Count);
#else
            Assert.Single(sut.PassedTests);
#endif
            Assert.Contains(info, sut.PassedTests);

            var actual = sut.PassedTests.First();
            Assert.Equal(info.MethodName, actual.MethodName);
            Assert.Equal(info.TestCollectionDisplayName, actual.TestCollectionDisplayName);
            Assert.Equal(info.TestDisplayName, actual.TestDisplayName);
            Assert.Equal(info.TypeName, actual.TypeName);
            Assert.Equal(info.ExecutionTime, actual.ExecutionTime);
        }
コード例 #17
0
 public void OnTestPassed(TestPassedInfo info)
 {
 }
コード例 #18
0
 private static void OnTestPassed(TestPassedInfo info)
 {
     lock (ConsoleLock)
         Console.WriteLine("[PASSED] {0}: {1}", info.TestDisplayName, info.ExecutionTime);
 }
コード例 #19
0
 void OnTestPassed(TestPassedInfo obj)
 => Result.Add(new TestExecutionViewModel(obj.TypeName, TestExecutionStatus.Passed));
コード例 #20
0
 public void OnTestPassed(TestPassedInfo info)
 {
     // do nothing
 }
コード例 #21
0
 private static void OnTestPassed(TestPassedInfo obj)
 {
     Console.WriteLine("Test Passed: " + obj.TestDisplayName);
 }
コード例 #22
0
 public void TestAddPassedTest(TestPassedInfo info)
 {
     this.AssertsTestAddPassedTest(info);
 }
コード例 #23
0
 private static void TestPassed(TestPassedInfo info)
 {
     Console.WriteLine(info.ToHumanString());
 }
コード例 #24
0
ファイル: Program.cs プロジェクト: tranb3r/securehttpclient
 private static void OnTestPassed(TestPassedInfo info)
 {
     Log.Information($"[PASS] {info.TestDisplayName}");
 }
コード例 #25
0
 public static string ToHumanString(this TestPassedInfo info)
 {
     return($"Name:{info.TestDisplayName}\nMethod:{info.MethodName}:ExecutionTime:{info.ExecutionTime}");
 }