public bool IsElementOfKind(UnitTestElement element, UnitTestElementKind kind) { if (element == null) { throw new ArgumentNullException("element"); } GallioTestElement gallioTestElement = element as GallioTestElement; if (gallioTestElement == null) { return(false); } switch (kind) { case UnitTestElementKind.Unknown: case UnitTestElementKind.TestStuff: return(false); case UnitTestElementKind.Test: return(gallioTestElement.IsTestCase); case UnitTestElementKind.TestContainer: return(!gallioTestElement.IsTestCase); default: throw new ArgumentOutOfRangeException("kind"); } }
public bool IsElementOfKind(IDeclaredElement element, UnitTestElementKind kind) { if (element == null) { throw new ArgumentNullException("element"); } return(EvalTestPartPredicate(element, testPart => { switch (kind) { case UnitTestElementKind.Unknown: return false; case UnitTestElementKind.Test: return testPart.IsTest; case UnitTestElementKind.TestContainer: return testPart.IsTestContainer; case UnitTestElementKind.TestStuff: return testPart.IsTestContribution; default: throw new ArgumentOutOfRangeException("kind"); } })); }
public bool IsOfKind(UnitTestElement element, UnitTestElementKind elementKind) { if (element is StorEvilScenarioElement) return elementKind == UnitTestElementKind.Test; if (element is StorEvilStoryElement || element is StorEvilProjectElement) return elementKind == UnitTestElementKind.TestContainer; return false; }
public bool IsElementOfKind(IUnitTestElement element, UnitTestElementKind elementKind) { var declaredElement = element.GetDeclaredElement(); if (declaredElement == null) { return(false); } return(IsElementOfKind(declaredElement, elementKind)); }
public bool IsElementOfKind(IUnitTestElement element, UnitTestElementKind elementKind) { switch (elementKind) { case UnitTestElementKind.Test: return element is SpecificationElement; case UnitTestElementKind.TestContainer: return element is SpecificationContainerElement; default: return false; } }
public bool IsElementOfKind(UnitTestElement element, UnitTestElementKind elementKind) { switch (elementKind) { case UnitTestElementKind.Test: return(element is ContextSpecificationElement); case UnitTestElementKind.TestContainer: return(element is ContextElement || element is BehaviorElement); } return(false); }
public bool IsElementOfKind(IDeclaredElement declaredElement, UnitTestElementKind elementKind) { switch (elementKind) { case UnitTestElementKind.Test: return(declaredElement.IsSpecification()); case UnitTestElementKind.TestContainer: return(declaredElement.IsContext() || declaredElement.IsBehavior()); } return(false); }
public bool IsOfKind(UnitTestElement element, UnitTestElementKind elementKind) { if (element is StorEvilScenarioElement) { return(elementKind == UnitTestElementKind.Test); } if (element is StorEvilStoryElement || element is StorEvilProjectElement || element is StorEvilScenarioOutlineElement) { return(elementKind == UnitTestElementKind.TestContainer); } return(false); }
public bool IsElementOfKind(IDeclaredElement declaredElement, UnitTestElementKind elementKind) { switch (elementKind) { case UnitTestElementKind.Test: return declaredElement.IsSpecification(); case UnitTestElementKind.TestContainer: return declaredElement.IsContext() || declaredElement.IsBehavior(); case UnitTestElementKind.TestStuff: return declaredElement.IsSpecification() || declaredElement.IsContext() || declaredElement.IsBehavior(); case UnitTestElementKind.Unknown: return !(declaredElement.IsSpecification() || declaredElement.IsContext() || declaredElement.IsBehavior()); } return false; }
public bool IsElementOfKind([NotNull] IDeclaredElement declaredElement, UnitTestElementKind elementKind) { var clazz = declaredElement as ITypeElement; if (clazz == null) { var member = declaredElement as ITypeMember; if (member == null) { return(false); } clazz = member.GetContainingType().NotNull(); } return(clazz.GetAttributeData <SuiteAttributeBase>() != null); }
public bool IsElementOfKind(IUnitTestElement element, UnitTestElementKind elementKind) { switch (elementKind) { case UnitTestElementKind.Test: return element is ContextSpecificationElement || element is BehaviorSpecificationElement; case UnitTestElementKind.TestContainer: return element is ContextElement || element is BehaviorElement; case UnitTestElementKind.TestStuff: return element is ContextSpecificationElement || element is BehaviorSpecificationElement || element is ContextElement || element is BehaviorElement; case UnitTestElementKind.Unknown: return !(element is ContextSpecificationElement || element is BehaviorSpecificationElement || element is ContextElement || element is BehaviorElement); } return false; }
public bool IsElementOfKind(IUnitTestElement element, UnitTestElementKind elementKind) { switch (elementKind) { case UnitTestElementKind.Unknown: return(!(element is JasmineSpecificationElement) && !(element is JasmineSuiteElement)); case UnitTestElementKind.Test: return(element is JasmineSpecificationElement); case UnitTestElementKind.TestContainer: return(element is JasmineSuiteElement); case UnitTestElementKind.TestStuff: return(element is JasmineSpecificationElement || element is JasmineSuiteElement); } throw new ArgumentOutOfRangeException("elementKind"); }
// Used to discover the type of the element - unknown, test, test container (class) or // something else relating to a test element (e.g. parent class of a nested test class) // This method is called to get the icon for the completion lists, amongst other things public bool IsElementOfKind(IDeclaredElement declaredElement, UnitTestElementKind elementKind) { switch (elementKind) { case UnitTestElementKind.Unknown: return(!declaredElement.IsAnyUnitTestElement()); case UnitTestElementKind.Test: return(declaredElement.IsUnitTest()); case UnitTestElementKind.TestContainer: return(declaredElement.IsUnitTestContainer()); case UnitTestElementKind.TestStuff: return(declaredElement.IsAnyUnitTestElement()); } return(false); }
public bool IsElementOfKind(IUnitTestElement element, UnitTestElementKind elementKind) { switch (elementKind) { case UnitTestElementKind.Unknown: return(!(element is BaseElement)); case UnitTestElementKind.Test: return((element is TestMethodElement && !((TestMethodElement)element).IsParameterized) || element is TestCaseElement); case UnitTestElementKind.TestContainer: return(element is TestClassElement || (element is TestMethodElement && ((TestMethodElement)element).IsParameterized)); case UnitTestElementKind.TestStuff: return(element is TestClassElement); } return(false); }
public bool IsElementOfKind(IUnitTestElement element, UnitTestElementKind elementKind) { switch (elementKind) { case UnitTestElementKind.Unknown: return(!(element is XunitTestMethodElement || element is XunitTestClassElement || element is XunitTestTheoryElement)); case UnitTestElementKind.Test: return((element is XunitTestMethodElement && !element.Children.Any()) || element is XunitTestTheoryElement); case UnitTestElementKind.TestContainer: return(element is XunitTestClassElement || element is XunitInheritedTestMethodContainerElement || (element is XunitTestMethodElement && element.Children.Any())); case UnitTestElementKind.TestStuff: return(element is XunitTestMethodElement || element is XunitTestClassElement || element is XunitInheritedTestMethodContainerElement || element is XunitTestTheoryElement); } return(false); }
public bool IsElementOfKind(IUnitTestElement element, UnitTestElementKind elementKind) { switch (elementKind) { case UnitTestElementKind.Unknown: return !(element is XunitTestMethodElement || element is XunitTestClassElement || element is XunitTestTheoryElement); case UnitTestElementKind.Test: return (element is XunitTestMethodElement && !element.Children.Any()) || element is XunitTestTheoryElement; case UnitTestElementKind.TestContainer: return element is XunitTestClassElement || element is XunitInheritedTestMethodContainerElement || (element is XunitTestMethodElement && element.Children.Any()); case UnitTestElementKind.TestStuff: return element is XunitTestMethodElement || element is XunitTestClassElement || element is XunitInheritedTestMethodContainerElement || element is XunitTestTheoryElement; } return false; }
public bool IsElementOfKind(IDeclaredElement declaredElement, UnitTestElementKind elementKind) { switch (elementKind) { case UnitTestElementKind.Unknown: return !UnitTestElementPsiIdentifier.IsAnyUnitTestElement(declaredElement); case UnitTestElementKind.Test: return UnitTestElementPsiIdentifier.IsUnitTest(declaredElement); case UnitTestElementKind.TestContainer: return UnitTestElementPsiIdentifier.IsUnitTestContainer(declaredElement); case UnitTestElementKind.TestStuff: return UnitTestElementPsiIdentifier.IsUnitTestStuff(declaredElement); } return false; }
public bool IsElementOfKind(IUnitTestElement element, UnitTestElementKind elementKind) { switch (elementKind) { case UnitTestElementKind.Unknown: return !(element is XunitTestElementBase); case UnitTestElementKind.Test: return element is XunitTestMethodElement; case UnitTestElementKind.TestContainer: return element is XunitTestClassElement; case UnitTestElementKind.TestStuff: return element is XunitTestElementBase; } return false; }
public bool IsElementOfKind(IDeclaredElement declaredElement, UnitTestElementKind elementKind) { switch (elementKind) { case UnitTestElementKind.Unknown: return(!IsUnitTestStuff(declaredElement)); case UnitTestElementKind.Test: return(IsUnitTest(declaredElement)); case UnitTestElementKind.TestContainer: return(IsUnitTestContainer(declaredElement)); case UnitTestElementKind.TestStuff: return(IsUnitTestStuff(declaredElement)); default: throw new ArgumentOutOfRangeException("elementKind"); } }
public bool IsElementOfKind(UnitTestElement element, UnitTestElementKind elementKind) { switch (elementKind) { case UnitTestElementKind.Unknown: return(!(element is CSUnitElementBase)); case UnitTestElementKind.Test: return(element is CSUnitTestElement); case UnitTestElementKind.TestContainer: return(element is CSUnitTestFixtureElement); case UnitTestElementKind.TestStuff: return(element is CSUnitElementBase); default: throw new ArgumentOutOfRangeException("elementKind"); } }
public bool IsElementOfKind(IUnitTestElement element, UnitTestElementKind elementKind) { switch (elementKind) { case UnitTestElementKind.Test: return(element is MspecSpecificationTestElement or MspecBehaviorSpecificationTestElement); case UnitTestElementKind.TestContainer: return(element is MspecContextTestElement); case UnitTestElementKind.TestStuff: return(element is MspecContextTestElement or MspecSpecificationTestElement or MspecBehaviorSpecificationTestElement); case UnitTestElementKind.Unknown: return(element is not MspecContextTestElement && element is not MspecSpecificationTestElement && element is not MspecBehaviorSpecificationTestElement); } return(false); }
public bool IsElementOfKind(IDeclaredElement declaredElement, UnitTestElementKind elementKind) { var isClass = declaredElement is ITypeElement; var isMethod = declaredElement is IFunction; switch (elementKind) { case UnitTestElementKind.Unknown: return(!isClass && !isMethod); case UnitTestElementKind.Test: return(isMethod && !isClass); case UnitTestElementKind.TestContainer: return(isClass); case UnitTestElementKind.TestStuff: return(isClass); default: throw new ArgumentOutOfRangeException(nameof(elementKind), elementKind, null); } }
public bool IsElementOfKind(IUnitTestElement element, UnitTestElementKind elementKind) { var testElement = element as ITestElement; return testElement != null && testElement.ElementKind == elementKind; }
public bool IsElementOfKind(IUnitTestElement element, UnitTestElementKind elementKind) { return(myNUnitTestProvider.IsElementOfKind(element, elementKind)); }
public bool IsElementOfKind(IUnitTestElement element, UnitTestElementKind elementKind) { switch (elementKind) { case UnitTestElementKind.Unknown: return !(element is JasmineSpecificationElement) && !(element is JasmineSuiteElement); case UnitTestElementKind.Test: return element is JasmineSpecificationElement; case UnitTestElementKind.TestContainer: return element is JasmineSuiteElement; case UnitTestElementKind.TestStuff: return element is JasmineSpecificationElement || element is JasmineSuiteElement; } throw new ArgumentOutOfRangeException("elementKind"); }
public bool IsElementOfKind(IDeclaredElement declaredElement, UnitTestElementKind elementKind) { switch (elementKind) { case UnitTestElementKind.Test: return declaredElement.IsSpecification(); case UnitTestElementKind.TestContainer: return declaredElement.IsContext(); } return false; }
public bool IsElementOfKind(IUnitTestElement element, UnitTestElementKind elementKind) { return(false); }
public bool IsElementOfKind(UnitTestElement element, UnitTestElementKind elementKind) { switch (elementKind) { case UnitTestElementKind.Test: return element is ContextSpecificationElement; case UnitTestElementKind.TestContainer: return element is ContextElement; } return false; }
public bool IsElementOfKind(IUnitTestElement element, UnitTestElementKind elementKind) { return false; }
public bool IsElementOfKind(IDeclaredElement declaredElement, UnitTestElementKind elementKind) { var clazz = declaredElement as ITypeElement; if (clazz == null) { var member = declaredElement as ITypeMember; if (member == null) return false; clazz = member.GetContainingType(); } return clazz.GetAttributeData<SuiteAttributeBase>() != null; }
public bool IsElementOfKind(IUnitTestElement element, UnitTestElementKind elementKind) { throw new NotImplementedException(); }
public bool IsElementOfKind(IDeclaredElement declaredElement, UnitTestElementKind elementKind) { return _comparer.IsDeclaredElementOfKind(declaredElement, elementKind); }
public bool IsElementOfKind(IDeclaredElement element, UnitTestElementKind kind) { if (element == null) throw new ArgumentNullException("element"); return EvalTestPartPredicate(element, testPart => { switch (kind) { case UnitTestElementKind.Unknown: return false; case UnitTestElementKind.Test: return testPart.IsTest; case UnitTestElementKind.TestContainer: return testPart.IsTestContainer; case UnitTestElementKind.TestStuff: return testPart.IsTestContribution; default: throw new ArgumentOutOfRangeException("kind"); } }); }
public bool IsElementOfKind(IDeclaredElement declaredElement, UnitTestElementKind elementKind) { return(myNUnitTestProvider.IsElementOfKind(declaredElement, elementKind)); }
public bool IsElementOfKind(IDeclaredElement declaredElement, UnitTestElementKind elementKind) { throw new System.NotImplementedException(); }
public bool IsElementOfKind(IDeclaredElement declaredElement, UnitTestElementKind elementKind) { //This never seems to get called, and by experiment I see no adverse effect of not implementing it. return false; }
public bool IsElementOfKind(IDeclaredElement declaredElement, UnitTestElementKind elementKind) { return(_comparer.IsDeclaredElementOfKind(declaredElement, elementKind)); }
public bool IsElementOfKind(UnitTestElement element, UnitTestElementKind kind) { return shim.IsElementOfKind(element, kind); }
public bool IsElementOfKind(UnitTestElement element, UnitTestElementKind kind) { if (element == null) throw new ArgumentNullException("element"); GallioTestElement gallioTestElement = element as GallioTestElement; if (gallioTestElement == null) return false; switch (kind) { case UnitTestElementKind.Unknown: case UnitTestElementKind.TestStuff: return false; case UnitTestElementKind.Test: return gallioTestElement.IsTestCase; case UnitTestElementKind.TestContainer: return ! gallioTestElement.IsTestCase; default: throw new ArgumentOutOfRangeException("kind"); } }
public bool IsElementOfKind(UnitTestElement element, UnitTestElementKind elementKind) { return(_comparer.IsOfKind(element, elementKind)); }
public bool IsElementOfKind(UnitTestElement element, UnitTestElementKind elementKind) { return _comparer.IsOfKind(element, elementKind); }
public bool IsElementOfKind([NotNull] IUnitTestElement element, UnitTestElementKind elementKind) { var testElement = element as ITestElement; return(testElement != null && testElement.ElementKind == elementKind); }
public bool IsElementOfKind(IDeclaredElement declaredElement, UnitTestElementKind elementKind) { return false; }
public bool IsElementOfKind(IDeclaredElement declaredElement, UnitTestElementKind elementKind) { return(false); }
public bool IsElementOfKind(UnitTestElement element, UnitTestElementKind kind) { return(shim.IsElementOfKind(element, kind)); }
public bool IsElementOfKind(IUnitTestElement element, UnitTestElementKind elementKind) { switch (elementKind) { case UnitTestElementKind.Unknown: return !(element is BaseElement); case UnitTestElementKind.Test: return (element is TestMethodElement && !((TestMethodElement)element).IsParameterized) || element is TestCaseElement; case UnitTestElementKind.TestContainer: return element is TestClassElement|| (element is TestMethodElement && ((TestMethodElement)element).IsParameterized); case UnitTestElementKind.TestStuff: return element is TestClassElement; } return false; }
public bool IsElementOfKind(IUnitTestElement element, UnitTestElementKind elementKind) { throw new NotImplementedException("It seems this method is used after all, please tell the NBehave team what you did to trigger this exception"); }