private static TestExecutionMethod PopulateCoreInfo(TestExecutionMethod testExecutionMethod, MethodInfo method) { testExecutionMethod.NamespaceName = method.ReflectedType.Namespace; testExecutionMethod.ClassName = method.ReflectedType.ClassNameIncludingParentsIfNested(); testExecutionMethod.MethodName = method.Name; return(testExecutionMethod); }
public bool WasEventAlreadyClosed(TestExecutionMethod message) { return(_completedMessage.Any(a => a.NamespaceName == message.NamespaceName && a.ClassName == message.ClassName && a.MethodName == message.MethodName)); }
private static void TranslateCoreInfo(ref TestCaseResult result, TestExecutionMethod message) { result.ClassName = message.ClassName; result.NamespaceName = message.NamespaceName; result.MethodName = message.MethodName; result.PopulateMetadata(message.Metadata); }
public static void AssignTestExecutionMethodInfo(this TestExecutionMethod testExecutionMethod, ITestMethod testMethod) { var methodInfo = testMethod.Method; testExecutionMethod.NamespaceName = methodInfo.ReflectedType.Namespace; testExecutionMethod.ClassName = methodInfo.ReflectedType.ClassNameIncludingParentsIfNested(); testExecutionMethod.MethodName = testMethod.Name; }
public void AddEvent(TestExecutionMethod 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 TestExecutionMethod testExecutionMethod, MethodInfo methodInfo) { var descriptionAttribute = methodInfo.GetAttribute <DescriptionAttribute>().FirstOrDefault(); if (descriptionAttribute != null) { testExecutionMethod.AddMetadata("Description", descriptionAttribute.Description, "Description"); } var ownerAttribute = methodInfo.GetAttribute <OwnerAttribute>().FirstOrDefault(); if (ownerAttribute != null) { testExecutionMethod.AddMetadata("Owner", ownerAttribute.Owner, "Owner"); } foreach (var testPropertyAttribute in methodInfo.GetAttribute <TestPropertyAttribute>()) { testExecutionMethod.AddMetadata("TestProperty", testPropertyAttribute.Name, testPropertyAttribute.Value); } }