Пример #1
0
        public void FlushTest()
        {
            Buffer.AddDeadPerson(3);
            Buffer.AddDeadPerson(1);
            Buffer.AddDeadPerson(22);

            Buffer.AddFireSpread(3, 4);
            Buffer.AddFireSpread(6, 4);
            Buffer.AddFireSpread(2, 4);

            Buffer.AddMove(1, 3, 5);
            Buffer.AddMove(3, 3, 2);
            Buffer.AddMove(22, 5, 5);


            UpdatesFlush u = Buffer.Flush();

            if (u.deadPeople.Length != 3 || u.movements.Length != 3 || u.fireSpreads.Length != 3)
            {
                Assert.Fail("The object was not created currectly");
            }
            else if (u.deadPeople.Length == 3 || u.movements.Length == 3 || u.fireSpreads.Length == 3)
            {
                Assert.IsTrue(true, "Exactly the expected amount in each list");
            }
        }