Example #1
0
        public void DescribeTo_appends_provided_description()
        {
            const string fixedDescription = "description";
            var          matcher          = new CustomMatcher <string>(fixedDescription, s => true);
            var          description      = MockRepository.GenerateStub <IDescription>();

            matcher.DescribeTo(description);

            description.AssertWasCalled(d => d.AppendText(fixedDescription),
                                        o => o.Message("AppendText was not called on the provided IDescription."));
        }
        public void DescribeTo_appends_provided_description()
        {
            const string fixedDescription = "description";
            var matcher = new CustomMatcher<string>(fixedDescription, s => true);
            var description = MockRepository.GenerateStub<IDescription>();

            matcher.DescribeTo(description);

            description.AssertWasCalled(d => d.AppendText(fixedDescription),
                o => o.Message("AppendText was not called on the provided IDescription."));
        }
Example #3
0
        public void DescribeTo_appends_provided_description()
        {
            const string fixedDescription = "description";
            var          matcher          = new CustomMatcher <string>(fixedDescription, s => true);
            var          descriptionMock  = new Mock <IDescription>();

            matcher.DescribeTo(descriptionMock.Object);

            descriptionMock.Verify(d => d.AppendText(fixedDescription), Times.Once);
            //o => o.Message("AppendText was not called on the provided IDescription."));
        }