Exemple #1
0
        public void ReturnFalseIfClassNotContainsMocksClass()
        {
            var sut = new IsClassContainsMocksClass();
            var classDeclaration = CreateClassDeclarationWithNestedClass("NotMocks");

            Assert.IsFalse(sut.Validate(classDeclaration));
        }
Exemple #2
0
        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));
        }