public void ChangeGame(Room room, WolfNet game) { string query = "INSERT INTO game (gameId, roomId, game_name) VALUES(@id, @roomId, @name)"; using (var cmd = new NpgsqlCommand(query, _connection, _transaction)) { cmd.Parameters.AddWithValue("id", game.ID); cmd.Parameters.AddWithValue("roomId", room.ID); cmd.Parameters.AddWithValue("name", game.GetGameName()); cmd.ExecuteNonQuery(); } }
public void CheckGameName() { Assert.Equal("Werewolf", game.GetGameName()); }