public void AddBookWithInvalidModelState()
        {
            var book = new Book();

            controller
            .Calling(c => c.AddBook(book))
            .ShouldHave()
            .InvalidModelState()
            .AndAlso()
            .ShouldReturn()
            .BadRequest();
        }
Exemple #2
0
        public void AddAuthorWithInvalidModelState()
        {
            var author = new Author();

            controller
            .Calling(c => c.AddAuthor(author))
            .ShouldHave()
            .InvalidModelState()
            .AndAlso()
            .ShouldReturn()
            .BadRequest();
        }