public async Task CreateGeoLocation_Valid() { // Ararnge var controller = CreateController(); var model = new MockGeoLocationModel().Valid(); RendererShouldReturn <CreateGeoLocationModel>(defaultSuccessReturnData); // Act var response = await controller.Geolocation(model); // Assert AssertIsOk(response); }
public async Task CreateGeoLocation_Invalid() { // Setup var controller = CreateController(modelStateInvalid: true); var model = new MockGeoLocationModel().Invalid(); RendererShouldReturn <CreateGeoLocationModel>(); // Perform var response = await controller.Geolocation(model); // Assert AssertIsBadRequest(response); }