public async Task GetThreeShouldReturnNotFound() { // Arrange var controller = new ObjectApiController(); // Act var result = await controller.Get(3) as NotFoundResult; // Assert result.Should().NotBeNull(); }
public async Task GetShouldReturnAllModels() { // Arrange var controller = new ObjectApiController(); // Act IEnumerable <Model> result = await controller.Get(); // Assert result.Should().NotBeNull(); result.Count().Should().Be(2); }
public async Task GetOneShouldReturnTheModel() { // Arrange var controller = new ObjectApiController(); // Act var result = await controller.Get(1) as OkNegotiatedContentResult <Model>; // Assert result.Should().NotBeNull(); result.Content.ShouldBeEquivalentTo(new Model { Id = 1 }); }