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); }
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); }
public void Test_GetGameByGenre_Null_Name_Of_Genre() { //arrange GameService servise = new GameService(_unitOfWork.Object, null); //act List<GameDTO> gamesList = servise.GetGameByGenre(null).ToList(); }