public async Task Put_NonExistingObjectIdPassed_ExistingObjectModifiedPassed_ReturnsNotFoundResponse() { // Arrange var notExistingObjectId = ObjectId.GenerateNewId().ToString(); var existingObjectModified = new Dish() { Id = "5fdfa9cbcf6e8d7bd407d4ba", Name = "MojitoV2", Description = "Mojito is a traditional Cuban highball. The cocktail often consists of five ingredients: white rum, sugar (traditionally sugar cane juice), lime juice, soda water, and mint.", Price = 5, Category = "Beverage", ServingTime = new List <string>() { "BreakFast", "Lunch", "Dinner" }, AvailableDays = new List <string>() { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" }, IsActive = true, TimeToWaitInMinutes = 10 }; // Act var badResponse = await _controller.Put(notExistingObjectId, existingObjectModified); // Assert Assert.IsType <NotFoundResult>(badResponse); }