public ClientEvent Translate(LogMessage message)
        {
            var scenarioResult = (ScenarioResult)message.Decorators[UnitTestLogDecorator.ScenarioResult];
            var testMethod = (ITestMethod)message.Decorators[UnitTestLogDecorator.TestMethodMetadata];

            var clientEventX = new TestExecutionMethodPassedClientEvent
                                   {
                                       Finished = scenarioResult.Finished,
                                       Started = scenarioResult.Started,
                                   };
            clientEventX.AssignMetadata(testMethod.Method);
            clientEventX.AssignTestExecutionMethodInfo(testMethod);
            return clientEventX;
        }
Ejemplo n.º 2
0
        private static void SendTestPassedClientEvent(MethodInfo method)
        {
            var passedClientEvent = new TestExecutionMethodPassedClientEvent
                                        {
                                            Started = new DateTime(),
                                            Finished = new DateTime(),
                                        };
            var e = PopulateCoreInfo(passedClientEvent, method);

            Server.PostMessage(e);
        }