public void Initialize() { testGR = new GameReplay(1, 1); User user1 = new User(1, "test1", "mo", "1234", 0, 5000, "*****@*****.**"); User user2 = new User(1, "test2", "no", "1234", 0, 5000, "*****@*****.**"); testAction1 = new CallAction(new Player(user1, 1000, 1), new Card(Suits.Hearts, 1), new Card(Suits.Hearts, 2), 10); testAction2 = new CallAction(new Player(user2, 1000, 1), new Card(Suits.Hearts, 3), new Card(Suits.Hearts, 4), 20); testGR.AddAction(testAction1); testGR.AddAction(testAction2); }
public void DeleteGameReplayTest() { Assert.IsNotNull(_testRM.GetGameReplayForUser(1, 1, 1)); _testRM.DeleteGameReplay(1, 1); Assert.IsNull(_testRM.GetGameReplayForUser(1, 1, 1)); _testGR = new GameReplay(1, 1); _testGR.AddAction(_testAction); List <int> ids = new List <int>(); ids.Add(1); Assert.IsTrue(_testRM.AddGameReplay(_testGR, ids)); }
public void Initialize() { User user1 = new User(1, "test1", "mo", "1234", 0, 5000, "*****@*****.**"); List <int> ids = new List <int>(); ids.Add(1); _testRM = new ReplayManager(); _testGR = new GameReplay(1, 1); _testAction = new CallAction(new Player(user1, 1000, 1), new Card(Suits.Hearts, 1), new Card(Suits.Hearts, 2), 10); _testGR.AddAction(_testAction); _testRM.AddGameReplay(_testGR, ids); }