Esempio n. 1
0
        public void SubDomainModel_ValidateEntity_InvalidEntity_ValidationResultIsReturned()
        {
            ISubDomainModel <TestDummy> testSubject = MockRepository.GeneratePartialMock <SubDomainModel <TestDummy> >();

            TestDummy entity = new TestDummy {
                TestNumber = 50
            };
            ICollection <ValidationResult> result = testSubject.ValidateEntity(entity);

            Assert.AreEqual(1, result.Count);
        }
Esempio n. 2
0
        public void SubDomainModel_ValidateEntity_NullEntity_ExceptionIsThrown()
        {
            ISubDomainModel <TestDummy> testSubject = MockRepository.GenerateMock <SubDomainModel <TestDummy> >();

            ICollection <ValidationResult> result = testSubject.ValidateEntity(null);
        }