Exemple #1
0
        public void StubAllHasPropertyBehaviorForAllPropertiesWhenStubbingClasses()
        {
            Housecat housecat = MockRepository.Partial <Housecat>();

            housecat.FurLength = 7;
            Assert.Equal(7, housecat.FurLength);

            housecat.Color = "Black";
            Assert.Equal("Black", housecat.Color);
        }
        public void StubAllHasPropertyBehaviorForAllPropertiesWhenStubbingClasses()
        {
            Housecat housecat = MockRepository.Partial <Housecat>();

            housecat.SetUnexpectedBehavior(UnexpectedCallBehaviors.BaseOrDefault);

            housecat.FurLength = 7;
            Assert.Equal(7, housecat.FurLength);

            housecat.Color = "Black";
            Assert.Equal("Black", housecat.Color);
        }