示例#1
0
        public void GetTimesTest09()
        {
            //Arrange
            Game[] games = new Game[] { testGame01, testGame01 };
            GameRecorder = GameRecorder.GetInstance;
            GameRecorder.Add(games);

            //Act
            //Assert
            Assert.Throws <ArgumentException>(() =>
                                              { GameRecorder.GetTimes(testPerson01, testPerson01); });
        }
示例#2
0
        public void AddTest02()
        {
            //Arrange
            Game[] games = new Game[] { testGame01, testGame01, testGame01, testGame01 };
            GameRecorder = GameRecorder.GetInstance;

            //Act
            GameRecorder.Add(games);
            int expected = 4;
            int actual   = GameRecorder.GetTimes(testPerson01, testPerson02);

            //Assert
            Assert.Equal(expected, actual);
        }
示例#3
0
        public void GetTimesTest04()
        {
            //Arrange
            Game[] games = new Game[] { testGame01, testGame01, testGame02 };
            GameRecorder = GameRecorder.GetInstance;
            GameRecorder.Add(games);

            //Act
            int actualCount   = GameRecorder.GetTimes(testPerson02, testPerson03);
            int expectedCount = 0;

            //Assert
            Assert.Equal(expectedCount, actualCount);
        }