public void When_creating_seat_then_adds_to_conference()
        {
            var seat = new SeatType()
            {
                Name        = "precon",
                Description = "perecon desc",
                Price       = 100,
                Quantity    = 100
            };

            _service.CreateSeat(this._conference.Id, seat);

            var seats = _service.FindSeatTypes(this._conference.Id);

            Assert.AreEqual(2, seats.Count());
        }
コード例 #2
0
 public static ConferenceInfo FindConference(string conferenceSlug)
 {
     var svc = new ConferenceService(BuildEventBus());
     var conference = svc.FindConference(conferenceSlug);
     if (null != conference)
     {
         if (conference.Seats.Count == 0)
             svc.FindSeatTypes(conference.Id).ToList().ForEach(s => conference.Seats.Add(s));
     }
     return conference;
 }
コード例 #3
0
        public void when_finding_seats_by_non_existing_conference_id_then_returns_empty()
        {
            var conference = service.FindSeatTypes(Guid.NewGuid());

            Assert.Empty(conference);
        }
コード例 #4
0
        public void when_finding_seats_by_non_existing_conference_id_then_returns_empty()
        {
            var conference = service.FindSeatTypes(this.conference.Id);

            Assert.NotEmpty(conference);
        }