public async void IntigrationTestMenuLookupSuccess(DateTime date) { var menulookupRepo = new LunchMenuLookupRepo(new System.Net.Http.HttpClient() { BaseAddress = new Uri(@"http://menuservice.energysystems.dk") }); var result = await menulookupRepo.GetByDate(date); Assert.NotNull(result); }
public async void IntigrationTestMenuLookupFail(DateTime date) { var menulookupRepo = new LunchMenuLookupRepo(new System.Net.Http.HttpClient() { BaseAddress = new Uri(@"http://menuservice.energysystems.dk") }); try { var result = await menulookupRepo.GetByDate(date); } catch (Exception ex) { Assert.True(ex.GetType() == typeof(RepoException)); } //fanger ikke exception :( //await Assert.ThrowsAsync<RepoException>(async () => await menulookupRepo.GetByDate(date)); }