public void GetVenueById_Successful() { var venueId = configuration["Venue:TestVenueIdWithSeatAttributes"]; var venue = service.GetVenueById(venueId); AssertVenueHasDetails(venue); }
private static Venue TestGetVenueById(VenueServiceApi venueServiceApi, string venueId) { Console.WriteLine(); Console.WriteLine(" ========================================================== "); Console.WriteLine($" Test: Get detailed venue by ID = {venueId} "); Console.WriteLine(" ========================================================== "); var venue = venueServiceApi.GetVenueById(venueId); Console.WriteLine($"{venue.title} ({venue.internalId}): {venue.compositeId}"); return(venue); }
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); }