public async Task CreateConference_ValidConfig_Created() { _factory.CreateUser("Vincent", true).SetupHttpClient(_client); var response = await _client.PostAsync("/v1/conference", JsonContent.Create(GetValidConference())); Assert.Equal(HttpStatusCode.OK, response.StatusCode); var result = await response.Content.ReadFromJsonAsync <ConferenceCreatedResponseDto>(); Assert.NotNull(result?.ConferenceId); }
public async Task PatchConference_DoesNotExist_ReturnConferenceNotFound() { _factory.CreateUser("Vincent", true).SetupHttpClient(_client); var patch = GetValidPatch(); var response = await _client.PatchAsync("/v1/conference/asdasd", JsonNetContent.Create(patch)); Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); var result = await response.Content.ReadFromJsonAsync <Error>(); Assert.Equal(ConferenceError.ConferenceNotFound.Code, result?.Code); }