private void PlugIn1_LanguageElementActivated(LanguageElementActivatedEventArgs ea) { if (ea.Element.InsideMethod) { Method method = DxCoreUtil.GetMethod(ea.Element); _currentTestData = _Tests.Find(test => test.Method == method); } }
public UnitTestDetail(string location, SmartTagProvider tagProvider) : this() { Location = location; try { _method = DxCoreUtil.GetMethod(location); } catch {// fail silently, try to get it later } }
/// <summary> /// Look for information about the the attribute. Create and add an information point if none exists and this is a test attribute /// </summary> private UnitTestDetail FindDataForTest(Attribute testAttribute) { UnitTestDetail testData = _Tests.Find(test => test.Method.RootNamespaceLocation == testAttribute.TargetNode.RootNamespaceLocation); if (testData == null) { if (RunnerFactory.IsTest(testAttribute)) // probably not needed because we can't get here unless GetFirstTestAttribute already performed the test, but not a bad safeguard. { testData = new UnitTestDetail(DxCoreUtil.GetMethod(testAttribute.TargetNode), testActions); _Tests.Add(testData); } ; } return(testData); }