public async Task TestPutVehicleItemAsync() { // Arrange var request = new { Url = "/api/Vehicle/8", Body = new { Id = 8, vin = "Test1232124", regNumber = "TestReg123", customerFk = 2, isConnected = false, } }; // Act var response = await Client.PutAsync(request.Url, ContentHelper.GetStringContent(request.Body)); // Assert response.EnsureSuccessStatusCode(); }
public async Task TestPostVehicleItemAsync() { // Arrange var request = new { Url = "/api/Vehicle", Body = new { vin = "Test13124", regNumber = "TestReg123", customerFk = 2, isConnected = true, } }; // Act var response = await Client.PostAsync(request.Url, ContentHelper.GetStringContent(request.Body)); var value = await response.Content.ReadAsStringAsync(); // Assert response.EnsureSuccessStatusCode(); }