Exemple #1
0
        public async Task Create_ValidObjectPassed_ReturnsCreatedResponse()
        {
            //Arrange
            var cbr = new CreateBookRequest
            {
                Title       = "Art of Unit Testing",
                Author      = "Roy Osherove",
                Description = "The Art of Unit Testing is a 2009 book by Roy Osherove which " +
                              "covers unit test writing for software.",
                Price      = 100,
                CoverImage = null
            };

            //Act
            var actionResult = await _bookController.CreateAsync(cbr);

            //Assert
            Assert.IsType <CreatedAtRouteResult>(actionResult);
        }