コード例 #1
0
        public void GetSeatAttributes_Successful()
        {
            var attributes = service.GetSeatAttributes(configuration["Venue:TestVenueIdWithSeatAttributes"]);

            Assert.IsNotEmpty(attributes);
            foreach (var attribute in attributes)
            {
                Assert.NotNull(attribute.SeatIdentifier);
                Assert.IsNotEmpty(attribute.Attributes);
                Assert.True(attribute.Attributes.All(a => !string.IsNullOrEmpty(a.Title)));
            }
        }
コード例 #2
0
        private static IList <SeatAttribute> TestGetSeatAttributes(VenueServiceApi venueServiceApi, string venueId)
        {
            Console.WriteLine();
            Console.WriteLine(" ========================================================== ");
            Console.WriteLine($" Test: Get seat attributes for {venueId}");
            Console.WriteLine(" ========================================================== ");
            IList <SeatAttribute> seatAttributes = venueServiceApi.GetSeatAttributes(venueId);

            foreach (var a in seatAttributes)
            {
                Console.WriteLine(
                    $"{a.seatIdentifier} - {a.attributes[0].title} [{(!string.IsNullOrEmpty(a.startDate) ? a.startDate : "-")}-{((!string.IsNullOrEmpty(a.endDate)) ? a.endDate : "-")} : {(a.performanceTimes != null ? string.Join(",", a.performanceTimes) : "-")}]");
            }

            return(seatAttributes);
        }