public void NewGame() { //Arrange StockGameDAL _dal = new StockGameDAL(_connectionString); Game game = new Game() { TimeStarted = DateTime.Now, Duration = 10 }; //Act int test = _dal.NewGame(game); //Assert Assert.IsNotNull(test); }
public void AddUserGame() { //Arrange StockGameDAL _dal = new StockGameDAL(_connectionString); Game game = new Game() { TimeStarted = DateTime.Now, Duration = 10 }; int _gameId = _dal.NewGame(game); //int userId = 9; int userId = _userId2; //int gameId = 2; int gameId = _gameId; //Act bool test = _dal.AddUserGame(userId); //Assert Assert.IsTrue(test); }
public void WipeUserGame() { //Lucas - works if data is in database //Arrange StockGameDAL _dal = new StockGameDAL(_connectionString); int userId = _userId2; Game game = new Game() { TimeStarted = DateTime.Now, Duration = 10 }; int _gameId = _dal.NewGame(game); _dal.AddUserGame(userId); //int gameId = 2; //Act bool test = _dal.WipeUserGame(_gameId); //Assert Assert.IsTrue(test); }