コード例 #1
0
        public void should_load_the_post_by_the_given_slug()
        {
            _controller.Comment(_validInput);

            _repository.AssertWasCalled(
                r => r.Query <Post>(null),
                o => o.Constraints(Property.Value("Slug", _testSlug)));
        }
コード例 #2
0
        public void should_return_validation_error_if_name_not_specified()
        {
            var output = _controller.Comment(_invalidInput);

            output.InvalidFields.Count.ShouldBeGreaterThan(0);
        }