public void UpdateVenue_Successful() { var venueId = configuration["Venue:TestVenueIdWithAddress"]; var sourceVenue = service.GetVenueById(venueId); var updatedVenue = service.UpdateVenueById(sourceVenue); AssertVenueHasDetails(updatedVenue); }
private static void TestUpdateVenue(VenueServiceApi venueServiceApi, Venue venue) { Console.WriteLine(); Console.WriteLine(" ========================================================== "); Console.WriteLine($" Test: Update venue by ID = {venue.internalId} "); Console.WriteLine(" ========================================================== "); var resultVenue = venueServiceApi.UpdateVenueById(venue); Console.WriteLine($"{resultVenue.title} ({resultVenue.internalId}): {resultVenue.compositeId}"); }
public void UpdateVenue_IfContextUnauthorized_Exception401() { var venueId = configuration["Venue:TestVenueIdWithAddress"]; service = new VenueServiceApi(context); var sourceVenue = service.GetVenueById(venueId); var exception = Assert.Catch <ApiException>(() => { var updatedVenue = service.UpdateVenueById(sourceVenue); }); AssertApiException(exception, HttpStatusCode.Unauthorized); }
public void UpdateVenue_IfTokenInvalid_Exception403() { var venueId = configuration["Venue:TestVenueIdWithAddress"]; context.AccessToken = "invalid_token"; service = new VenueServiceApi(context); var sourceVenue = service.GetVenueById(venueId); var exception = Assert.Catch <ApiException>(() => { var updatedVenue = service.UpdateVenueById(sourceVenue); }); AssertApiException(exception, HttpStatusCode.Forbidden); }