private static void TestUpsertSeatAttributes(VenueServiceApi venueServiceApi, string venueId, IList <SeatAttribute> seatAttributes) { Console.WriteLine(); Console.WriteLine(" ========================================================== "); Console.WriteLine($" Test: Upsert seat attributes for {venueId}"); Console.WriteLine(" ========================================================== "); var result = venueServiceApi.UpsertSeatAttributes(venueId, seatAttributes); Console.WriteLine(result); }
public void UpsertSeatAttributes_IfSeatAttributeIsNotInitialized_Exception401() { var venueId = configuration["Venue:TestVenueIdWithSeatAttributes"]; var sourceAttributes = service.GetSeatAttributes(venueId); service = new VenueServiceApi(context); var exception = Assert.Catch <ApiException>(() => { var result = service.UpsertSeatAttributes(venueId, sourceAttributes); }); AssertApiException(exception, HttpStatusCode.Unauthorized); }
public void UpsertSeatAttributes_Successful() { var venueId = configuration["Venue:TestVenueIdWithSeatAttributes"]; var sourceAttributes = service.GetSeatAttributes(venueId); var result = service.UpsertSeatAttributes(venueId, sourceAttributes); Assert.True(result); }
public void UpsertSeatAttributes_IfTokenInvalid_Exception403() { var venueId = configuration["Venue:TestVenueIdWithSeatAttributes"]; var sourceAttributes = service.GetSeatAttributes(venueId); context.AccessToken = "invalid_token"; service = new VenueServiceApi(context); var exception = Assert.Catch <ApiException>(() => { var result = service.UpsertSeatAttributes(venueId, sourceAttributes); }); AssertApiException(exception, HttpStatusCode.Forbidden); }