public void HasNUnitTestAttribute() { List <MockAttribute> attributes = new List <MockAttribute>(); attributes.Add(new MockAttribute("NUnit.Framework.TestAttribute")); MockMethod mockMethod = CreateMockMethod(attributes); Assert.IsTrue(TestMethod.IsTestMethod(mockMethod)); }
public void HasTestAttribute() { List <MockAttribute> attributes = new List <MockAttribute>(); attributes.Add(new MockAttribute("Test")); MockMethod mockMethod = CreateMockMethod(attributes); Assert.IsTrue(TestMethod.IsTestMethod(mockMethod)); }
public void NullProject() { List <MockAttribute> attributes = new List <MockAttribute>(); attributes.Add(new MockAttribute("Test")); MockMethod mockMethod = CreateMockMethod(attributes); MockProjectContent mockProjectContent = (MockProjectContent)mockMethod.DeclaringType.ProjectContent; mockProjectContent.Project = null; Assert.IsTrue(TestMethod.IsTestMethod(mockMethod)); }
public void MethodHasParameters() { List <MockAttribute> attributes = new List <MockAttribute>(); attributes.Add(new MockAttribute("Test")); MockMethod mockMethod = CreateMockMethod(attributes); MockParameter mockParameter = new MockParameter(); mockMethod.Parameters.Add(mockParameter); Assert.IsFalse(TestMethod.IsTestMethod(mockMethod)); }
public void NullLanguage() { IProject project = new MockCSharpProject(); MockClass mockClass = new MockClass(); MockProjectContent mockProjectContent = new MockProjectContent(); mockProjectContent.Project = project; mockClass.ProjectContent = mockProjectContent; MockMethod mockMethod = new MockMethod(); mockMethod.DeclaringType = mockClass; Assert.IsFalse(TestMethod.IsTestMethod(mockMethod)); }
public void NullNameComparer() { IProject project = new MockCSharpProject(); MockClass mockClass = new MockClass(); MockProjectContent mockProjectContent = new MockProjectContent(); mockProjectContent.Project = project; mockProjectContent.Language = new LanguageProperties(null); mockClass.ProjectContent = mockProjectContent; MockMethod mockMethod = new MockMethod(); mockMethod.DeclaringType = mockClass; mockMethod.Attributes.Add(new MockAttribute("Test")); Assert.IsFalse(TestMethod.IsTestMethod(mockMethod)); }
public void NullMethod() { Assert.IsFalse(TestMethod.IsTestMethod(null)); }
public void HasNoAttributes() { MockMethod mockMethod = CreateMockMethod(); Assert.IsFalse(TestMethod.IsTestMethod(mockMethod)); }
public void NullDeclaringType() { MockMethod mockMethod = new MockMethod(); Assert.IsFalse(TestMethod.IsTestMethod(mockMethod)); }