Beispiel #1
0
        public void GamePlatformListAddandRemoveTest()
        {
            var gamePlatformList = new GamePlatformList();

            Assert.AreEqual(gamePlatformList.List.Count, 0);

            gamePlatformList.Add(new GamePlatform(
                                     1,
                                     2,
                                     3));

            Assert.AreEqual(gamePlatformList.List.Count, 1);

            gamePlatformList.Add(new GamePlatform(
                                     2,
                                     3,
                                     4));

            Assert.AreEqual(gamePlatformList.List.Count, 2);

            gamePlatformList.Add(new GamePlatform(
                                     3,
                                     4,
                                     5));

            Assert.AreEqual(gamePlatformList.List.Count, 3);

            gamePlatformList.Remove(1);

            Assert.AreEqual(gamePlatformList.List.Count, 2);

            gamePlatformList.Remove(3);

            Assert.AreEqual(gamePlatformList.List.Count, 1);

            gamePlatformList.Remove(2);

            Assert.AreEqual(gamePlatformList.List.Count, 0);
        }