public void ReturnFalseIfClassNotContainsMocksClass() { var sut = new IsClassContainsMocksClass(); var classDeclaration = CreateClassDeclarationWithNestedClass("NotMocks"); Assert.IsFalse(sut.Validate(classDeclaration)); }
public void ReturnFalseIfClassNotContainsAnyClasses() { var sut = new IsClassContainsMocksClass(); var classDeclaration = MockFactory.CreateMock <IClassDeclaration>(); classDeclaration.Expects.One.GetProperty(o => o.NestedTypeDeclarations) .WillReturn(new TreeNodeCollection <ICSharpTypeDeclaration>(new ICSharpTypeDeclaration[] { })); Assert.IsFalse(sut.Validate(classDeclaration.MockObject)); }