public void GameRepositoryEnsureICanAddGameInformation() { GameRepository game_repo = new GameRepository(mock_context.Object); Game newgame = new Game{ Title = "MyGame", GameId = 1}; my_game.Add(new GameInformation{ ScoreHoleOne = 6, GameInformationId = 7 }); ConnectMocksToDataSource(); bool actual = my_game.AddGameInformation(1, newgame); Assert.AreEqual(1, game_repo.GetGameCount()); Assert.IsTrue(actual); }
public void GameRepositoryEnsureICanCreateInstance() { GameRepository game = new GameRepository(mock_context.Object); Assert.IsNotNull(game); }
public void GameRepositoryEnsureFalseIfInvalidBoardId() { GameRepository board_repo = new GameRepository(mock_context.Object); BrelloList list = new BrelloList { Title = "ToDo", BrelloListId = 1 }; my_list.Add(new Board { Title = "My First Board", Owner = user1, BoardId = 1 }); ConnectMocksToDataSource(); bool actual = board_repo.AddList(3, list); Assert.AreEqual(0, board_repo.GetListCount()); Assert.IsFalse(actual); }