public void ListPerformances_ExistingTheatres_ShouldReturnCollection() { const string TheatreName = "Sofiq"; const string Performance = "Vecher"; const decimal TicketPrice = 15.50m; DateTime startDate = new DateTime(2015, 2, 4, 8, 30, 0); TimeSpan duration = new TimeSpan(0, 2, 30, 00); var database = new PerformanceDatabase(); database.AddTheatre(TheatreName); database.AddPerformance(TheatreName, Performance, startDate, duration, TicketPrice); var result = database.ListPerformances(TheatreName).First(); Assert.AreEqual(TheatreName, result.TheatreName); Assert.AreEqual(Performance, result.Performances); Assert.AreEqual(startDate, result.StartDate); Assert.AreEqual(duration, result.Duration); Assert.AreEqual(TicketPrice, result.TicketPrice); }
public void ListPerformances_NonExistingTheatres_ShouldThrow() { var database = new PerformanceDatabase(); database.ListPerformances("Sofiq"); }