Ejemplo n.º 1
0
        public void RemovePerformanceFromTheListOfPerformancesTest()
        {
            inListOfPerformances = new List <Performance>();
            play = new Play(0, "Paul", PlayType.Major, "Mike", 10f, inListOfPerformances);
            Performance performance  = new Performance(0, DateTime.Now, 0);
            Performance performance2 = new Performance(1, DateTime.Now, 0);

            Assert.AreEqual(true, play.AddPerformanceToTheListOfPerformances(performance));
            Assert.AreEqual(true, play.AddPerformanceToTheListOfPerformances(performance2));

            play.RemovePerformanceFromTheListOfPerformances(0);

            if (inListOfPerformances[0] == performance)
            {
                Assert.Fail();
            }
        }
Ejemplo n.º 2
0
        public void AddPerformanceToTheListOfPerformancesTest()
        {
            play = new Play(0, "Paul", PlayType.Major, "Mike", 10f, inListOfPerformances);
            Performance performance = new Performance(1, DateTime.Now, 0);

            Assert.AreEqual(true, play.AddPerformanceToTheListOfPerformances(performance));

            Assert.AreEqual(performance, inListOfPerformances[0]);
        }