public bool WasEventAlreadyClosed(TestExecutionMethodClientEvent message) { return(_completedMessage.Any(a => a.NamespaceName == message.NamespaceName && a.ClassName == message.ClassName && a.MethodName == message.MethodName)); }
private static TestExecutionMethodClientEvent PopulateCoreInfo(TestExecutionMethodClientEvent testExecutionMethodClientEvent, MethodInfo method) { testExecutionMethodClientEvent.NamespaceName = method.ReflectedType.Namespace; testExecutionMethodClientEvent.ClassName = method.ReflectedType.ClassNameIncludingParentsIfNested(); testExecutionMethodClientEvent.MethodName = method.Name; return(testExecutionMethodClientEvent); }
public static void AssignTestExecutionMethodInfo(this TestExecutionMethodClientEvent testExecutionMethodClientEvent, ITestMethod testMethod) { var methodInfo = testMethod.Method; testExecutionMethodClientEvent.NamespaceName = methodInfo.ReflectedType.Namespace; testExecutionMethodClientEvent.ClassName = methodInfo.ReflectedType.ClassNameIncludingParentsIfNested(); testExecutionMethodClientEvent.MethodName = testMethod.Name; }
public void AddEvent(TestExecutionMethodClientEvent clientEvent, Action actionOnCompletion) { lock (_sync) { if (_awaitingForAMatch.ContainsKey(clientEvent.FullMethodName)) { _awaitingForAMatch.Remove(clientEvent.FullMethodName); actionOnCompletion(); } else { _awaitingForAMatch.Add(clientEvent.FullMethodName, actionOnCompletion); } } }
public static void AssignMetadata(this TestExecutionMethodClientEvent testExecutionMethodClientEvent, MethodInfo methodInfo) { var descriptionAttribute = methodInfo.GetAttribute <DescriptionAttribute>().FirstOrDefault(); if (descriptionAttribute != null) { testExecutionMethodClientEvent.AddMetadata("Description", descriptionAttribute.Description, "Description"); } var ownerAttribute = methodInfo.GetAttribute <OwnerAttribute>().FirstOrDefault(); if (ownerAttribute != null) { testExecutionMethodClientEvent.AddMetadata("Owner", ownerAttribute.Owner, "Owner"); } foreach (var testPropertyAttribute in methodInfo.GetAttribute <TestPropertyAttribute>()) { testExecutionMethodClientEvent.AddMetadata("TestProperty", testPropertyAttribute.Name, testPropertyAttribute.Value); } }
private static void TranslateCoreInfo(ref TestCaseResultServerEvent resultServerEvent, TestExecutionMethodClientEvent message) { resultServerEvent.ClassName = message.ClassName; resultServerEvent.NamespaceName = message.NamespaceName; resultServerEvent.MethodName = message.MethodName; resultServerEvent.PopulateMetadata(message.Metadata); }