public void TestAddTheatre_ShouldThrowDuplicateTheatreException() { Engine engine = new Engine(); const string TheatreName = "Some theatre"; engine.AddTheatre(TheatreName); engine.AddTheatre(TheatreName); }
public void TestAddPerformance_ShouldAddOnePerformance() { Engine engine = new Engine(); engine.AddTheatre("testTheatre"); engine.AddPerformance("testTheatre", "perform", DateTime.Now, new TimeSpan(1, 3, 1), 1m); Assert.AreEqual(1, engine.ListAllPerformances().Count()); }
public void TestAddPerformance_ShouldThrowTimeDurationOverlapException() { Engine engine = new Engine(); engine.AddTheatre("testTheatre"); engine.AddPerformance("testTheatre", "perform", new DateTime(2000, 11, 11, 12, 12, 12), new TimeSpan(1, 3, 1), 1m); engine.AddPerformance("testTheatre", "perform", new DateTime(2000, 11, 11, 11, 55, 12), new TimeSpan(1, 3, 1), 1m); }
public void TestListPerformances_ShouldHaveZeroElements() { Engine engine = new Engine(); const string TheatreName = "Some theatre"; engine.AddTheatre(TheatreName); var performances = engine.ListPerformances(TheatreName); Assert.AreEqual(0, performances.Count()); }
protected static void Main() { Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; var theatreEngine = new Engine(); theatreEngine.Run(); }
public void TestAddPerformance_ShouldAddManyPerformance() { Engine engine = new Engine(); engine.AddTheatre("testTheatre"); for (int i = 0; i < 10; i++) { engine.AddPerformance("testTheatre", "perform" + i, new DateTime(2000, 11, i + 1), new TimeSpan(1, 3, 1), 1m); } Assert.AreEqual(10, engine.ListAllPerformances().Count()); }
public void TestListTheatres_ShouldHaveManyElements() { int testElementsToAdd = 20; Engine engine = new Engine(); var theatres = engine.ListTheatres(); for (int i = 0; i < testElementsToAdd; i++) { string name = "Theatr" + i; engine.AddTheatre(name); } Assert.AreEqual(testElementsToAdd, theatres.Count()); }
public void TestListPerformances_ShouldThrowTheatreNotFoundException() { Engine engine = new Engine(); const string TheatreName = "Some theatre"; engine.ListPerformances(TheatreName); }
public void TestEmptyListTheatres_ShouldHaveZeroElements() { Engine engine = new Engine(); int elementCount = engine.ListTheatres().Count(); Assert.AreEqual(0, elementCount); }
public void TestAddPerformance_ShouldThrowTheatreNotFoundException() { Engine engine = new Engine(); engine.AddPerformance("testTheatre", "perform", DateTime.Now, new TimeSpan(1, 3, 1), 1m); }
public void TestListTheatres_ShouldHaveOneElements() { Engine engine = new Engine(); var theatres = engine.ListTheatres(); engine.AddTheatre("test"); Assert.AreEqual(1, theatres.Count()); }
public void InitTheater() { this.applicationEngine = new Engine(); }