public async Task GetCustomerApplianceHistory_NonAssignedCustomer_Fails() { (await _client.AuthenticateUserAsync("jcole", "password")).AddAuthorization(_httpClient); var guid = Guid.Parse("d53a5412-efdd-4905-9f5d-5c2a624726a2"); CustomerDetailedPageDto dto = null; Assert.NotNull(await Record.ExceptionAsync(async() => { dto = await _client.Caretaker_GetCustomerApplianceHistoryAsync(guid, TimeInterval.Day, 0); })); Assert.Null(dto); }
public async Task GetDetailedPage_InvalidRequest_Fails() { (await _client.AuthenticateUserAsync("mwilson", "password")).AddAuthorization(_httpClient); CustomerDetailedPageDto response = null; Assert.NotNull(await Record.ExceptionAsync(async() => response = await _client.Customer_GetDetailedPageAsync(TimeInterval.Day, -1))); Assert.Null(response); Assert.NotNull(await Record.ExceptionAsync(async() => response = await _client.Customer_GetDetailedPageAsync((TimeInterval)12, -1))); Assert.Null(response); }
public async Task GetCustomerApplianceHistory_InvalidParameters_Fails() { using (var context = _factory.GetKIOTContext()) { _ = context.AddCaretakerForCustomer("jcole", "mwilson"); } (await _client.AuthenticateUserAsync("jcole", "password")).AddAuthorization(_httpClient); var guid = Guid.Parse("d53a5412-efdd-4905-9f5d-5c2a624726a2"); CustomerDetailedPageDto dto = null; Assert.NotNull(await Record.ExceptionAsync(async() => { dto = await _client.Caretaker_GetCustomerApplianceHistoryAsync(guid, TimeInterval.Day, -1); })); Assert.Null(dto); }