Exemplo n.º 1
0
        public async Task Add_ValidObjectPassed_ReturnsCreatedResponse()
        {
            // Arrange
            SaveDishResource testItem = new SaveDishResource()
            {
                Name        = "Coca Cola",
                Description = "Coca Cola is a carbonated soft drink manufactured by The Coca-Cola Company. ",
                Price       = 3,
                Category    = "Beverage",
                ServingTime = new List <string>()
                {
                    "Lunch", "Dinner"
                },
                AvailableDays = new List <string>()
                {
                    "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"
                },
                IsActive            = true,
                TimeToWaitInMinutes = 2
            };

            // Act
            var createdResponse = await _controller.Post(testItem);

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