public async Task GetColorNotFoundResult(ICollection <CarColor> colors) { // Arrange var query = new CarContextQueryMockBuilder().SetCarColors(colors).CarsContextQuery; var controller = new CarColorsQueryController(query); // Act IHttpActionResult result = await controller.GetColor(0); // Assert result.Should().BeOfType <NotFoundResult>(); }
public async Task GetColorOkResult(ICollection <CarColor> colors) { // Arrange var query = new CarContextQueryMockBuilder().SetCarColors(colors).CarsContextQuery; var controller = new CarColorsQueryController(query); // Act IHttpActionResult result = await controller.GetColor(1); // Assert result.Should().BeOfType <OkNegotiatedContentResult <ColorReadModel> >(); }