Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        public void UpsertSeatAttributes_Successful()
        {
            var venueId          = configuration["Venue:TestVenueIdWithSeatAttributes"];
            var sourceAttributes = service.GetSeatAttributes(venueId);

            var result = service.UpsertSeatAttributes(venueId, sourceAttributes);

            Assert.True(result);
        }
Exemplo n.º 4
0
        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);
        }