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()); }
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; }
public void when_finding_seats_by_non_existing_conference_id_then_returns_empty() { var conference = service.FindSeatTypes(Guid.NewGuid()); Assert.Empty(conference); }
public void when_finding_seats_by_non_existing_conference_id_then_returns_empty() { var conference = service.FindSeatTypes(this.conference.Id); Assert.NotEmpty(conference); }