예제 #1
0
        public void UpdateVenue_Successful()
        {
            var venueId     = configuration["Venue:TestVenueIdWithAddress"];
            var sourceVenue = service.GetVenueById(venueId);

            var updatedVenue = service.UpdateVenueById(sourceVenue);

            AssertVenueHasDetails(updatedVenue);
        }
예제 #2
0
        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}");
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }