コード例 #1
0
        public void Test_GetGameByGenre_Return_Rigth_Object()
        {
            //arrange
            GameService servise = new GameService(_unitOfWork.Object, null);

            //act
            List<GameDTO> gamesList = servise.GetGameByGenre("RPG").ToList();

            //assert
            Assert.AreEqual(gamesList.Count, 1);
            Assert.IsTrue(gamesList[0].GameId == 1);
        }
コード例 #2
0
        public void Test_GetGameByGenre_Search_With_Subgenre()
        {
            //arrange
            GameService servise = new GameService(_unitOfWork.Object, null);

            //act
            List<GameDTO> gamesList = servise.GetGameByGenre("Races").ToList();

            //assert
            Assert.AreEqual(gamesList.Count, 1);
            Assert.AreEqual(2, gamesList[0].GameId);
        }
コード例 #3
0
        public void Test_GetGameByGenre_Null_Name_Of_Genre()
        {
            //arrange
            GameService servise = new GameService(_unitOfWork.Object, null);

            //act
            List<GameDTO> gamesList = servise.GetGameByGenre(null).ToList();
        }