コード例 #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."));
        }
コード例 #2
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."));
        }
コード例 #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."));
        }