public void CreateRoomThatCannotHaveStories() { var client = new PlanitPockerClient(); var player = client.QuickPlayLogin("John"); var game = player.CreateRoomHaveStories("Test Room", false); var info = game.GetRoomInfo(); Assert.False(info.haveStories); }
public void DontShowVotesToObservers() { var client = new PlanitPockerClient(); var player = client.QuickPlayLogin("John"); var game = player.CreateRoomObserverSeeingVotes("John", false); var info = game.GetRoomInfo(); Assert.False(info.showVotingToObservers); }
public void SkipStoriesWithoutConfirmation() { var client = new PlanitPockerClient(); var player = client.QuickPlayLogin("John"); var game = player.CreateRoomSkipConfirmation("John", false); var info = game.GetRoomInfo(); Assert.False(info.confirmSkip); }
public void NoAutomaticRevealVotes() { var client = new PlanitPockerClient(); var player = client.QuickPlayLogin("John"); var game = player.CreateRoomAutoVoteReveal("John", false); var info = game.GetRoomInfo(); Assert.False(info.autoReveal); }
public void AllowVoteChangeAfterVoting() { var client = new PlanitPockerClient(); var player = client.QuickPlayLogin("John"); var game = player.CreateRoomAllowChangeVote("John", true); var info = game.GetRoomInfo(); Assert.True(info.changeVote); }
public void SignUpLoginGameRoom() { var client = new PlanitPockerClient(); var player = client.SignUpLogin("*****@*****.**", "John", "password123"); var game = player.CreateRoom("Test Room"); var info = game.GetRoomInfo(); Assert.Equal("Test Room", info.title); }
public void QuickPlayLoginGameRoom() { var client = new PlanitPockerClient(); var player = client.QuickPlayLogin("John"); var game = player.CreateRoom("Test Room"); var info = game.GetRoomInfo(); Assert.Equal("Test Room", info.title); }
public void UseCountdownTimer() { var client = new PlanitPockerClient(); var player = client.QuickPlayLogin("John"); //this next method also requires the duration of the countdown timer in seconds var game = player.UseCountDownTimer("John", true, 30); var info = game.GetRoomInfo(); Assert.True(info.countdownTimer); }
public void DeleteGameRoom() { var client = new PlanitPockerClient(); var player = client.QuickPlayLogin("John"); var game = player.CreateRoom("Test Room"); var info = game.DeleteGameRoom(); var sert = info.GetGamesListInfo(); //asserts that the game room that previously had the name "Test Room" does not longer has its name Assert.Null(sert[0].name); }
public void ModifyGameRoomSettings() { //by default, the game creates rooms without a countdown timer //this test will create a game (without a countdown timer) and then add the countdowntimer var client = new PlanitPockerClient(); var player = client.QuickPlayLogin("John"); var game = player.CreateRoom("Test Room"); //now we add the countdown timer by modifying the Room settings var info = game.EditCreatedGameRoom("Test Room", true, 30); var sert = info.GetGamesListInfo(); Assert.True(sert[0].countdownTimer); }
public void ResetGameRoom() { var client = new PlanitPockerClient(); var player = client.QuickPlayLogin("John"); var game = player.CreateRoom("Test Room"); game.StartGame(); game.Vote(); game.FinishVoting(); var info = game.ResetGameRoom(); Assert.False(info.GetPlayersAndStateInfo().players[0].voted); }
public void CanNewUserStartTheGame() { var client = new PlanitPockerClient(); var player = client.QuickPlayLogin("John"); var game = player.CreateRoom("Test Room"); game.CreateStory("Test Story"); var uGame = game.NewUserQuickPlayLogin("Jack"); uGame.GetInGameRoom(); var info = uGame.StartGame(); Assert.False(info.GetRoomInfo().gameStarted); }
public void CanNewUserConnectToGame() { var client = new PlanitPockerClient(); var player = client.QuickPlayLogin("John"); var game = player.CreateRoom("Test Room"); game.CreateStory("Test Story"); var uGame = game.NewUserQuickPlayLogin("Jack"); uGame.GetInGameRoom(); var info = game.StartGame(); Assert.Equal("Jack", info.GetPlayersAndStateInfo().players[1].name); }
public void CanNewUserEndTheVotingProcess() { var client = new PlanitPockerClient(); var player = client.QuickPlayLogin("John"); var game = player.CreateRoom("Test Room"); game.CreateStory("Test Story"); game.StartGame(); var uGame = game.NewUserQuickPlayLogin("Jack"); uGame.GetInGameRoom(); game.Vote(); var info = uGame.FinishVoting(); Assert.False(info.GetPlayersAndStateInfo().closed); }
public void CanNewUserChangeStoryName() { var client = new PlanitPockerClient(); var player = client.QuickPlayLogin("John"); var game = player.CreateRoom("Test Room"); var info = game.CreateStory("First Story"); var uGame = game.NewUserQuickPlayLogin("Jack"); uGame.GetInGameRoom(); var story = uGame.GetStoryEditInfo(); story.StoriesUpdate("First Story Modified"); var edit = story.GetStoryChangeInformation(); Assert.Equal("First Story", edit.stories[0].title); }
public void CanNewUserCreateAStory() { var client = new PlanitPockerClient(); var player = client.QuickPlayLogin("John"); var game = player.CreateRoom("Test Room"); game.CreateStory("Test Story"); var uGame = game.NewUserQuickPlayLogin("Jack"); uGame.GetInGameRoom(); var info = uGame.CreateStory("New User Test Story"); //second user cannot create stories; //thus even if he calls the "CreateStory" API, the number of stories is the number of stories created by the moderator Assert.Equal(1, info.GetStoryInfo().storiesCount); }
public void CanNewUserSkipStories() { var client = new PlanitPockerClient(); var player = client.QuickPlayLogin("John"); var game = player.CreateRoom("Test Room"); game.CreateStory("First Story"); game.CreateStory("Second Story"); var uGame = game.NewUserQuickPlayLogin("Jack"); uGame.GetInGameRoom(); game.StartGame(); uGame.SkipStory(); var info = game.StartGame(); Assert.Equal("First Story", info.GetCurrentStoryInfo().title); }
public void CanNewUserVote() { var client = new PlanitPockerClient(); var player = client.QuickPlayLogin("John"); var game = player.CreateRoom("Test Room"); game.CreateStory("Test Story"); var uGame = game.NewUserQuickPlayLogin("Jack"); uGame.GetInGameRoom(); game.StartGame(); var info = uGame.Vote(); //extra assert to make sure that the vote is not registered for User John (players[0]) //Assert.False(info.GetVoteInfo().players[0].voted); Assert.True(info.GetVoteInfo().players[1].voted); }
public void CanNewUserClearVotes() { var client = new PlanitPockerClient(); var player = client.QuickPlayLogin("John"); var game = player.CreateRoom("Test Room"); game.CreateStory("First Story"); game.StartGame(); var uGame = game.NewUserQuickPlayLogin("Jack"); uGame.GetInGameRoom(); game.Vote(); var info = uGame.ClearVotes(); Assert.True(info.GetPlayersAndStateInfo().players[0].voted); //user 1 votes and user 2 tried to clear votes, and is unable to //thus user 1 voted parameter remains true }
public void CanNewUserClearVotesAfterFinishVoting() { var client = new PlanitPockerClient(); var player = client.QuickPlayLogin("John"); var game = player.CreateRoom("Test Room"); game.CreateStory("First Story"); game.StartGame(); var uGame = game.NewUserQuickPlayLogin("Jack"); uGame.GetInGameRoom(); game.Vote(); game.FinishVoting(); var info = uGame.ClearVotes(); Assert.True(info.GetPlayersAndStateInfo().players[0].voted); //see above test for explanations }
public void CanNewUserRevealCards() //BUG FOUND !!! { var client = new PlanitPockerClient(); var player = client.QuickPlayLogin("John"); var game = player.CreateRoom("Test Room"); game.CreateStory("First Story"); game.StartGame(); var uGame = game.NewUserQuickPlayLogin("Jack"); uGame.GetInGameRoom(); var info = uGame.RevealCards(); Assert.Null(info.GetVoteInfo().players[1].vote); //if the votes are revealed before the users vote, the vote values become -1 //if the cards are not revealed, the "vote" parameter should be null, however Test Explorer shows vote = -1 //apparently the second user (using his own cookie) can Reveal the cards; this should not happen normally }
public void CanNewUserResetTimer() { var client = new PlanitPockerClient(); var player = client.QuickPlayLogin("John"); var game = player.CreateRoom("Test Room"); game.CreateStory("First Story"); var info = game.StartGame(); var first = info.GetCurrentStoryInfo(); var initialTimer = first.GetVotingStart(); var uGame = game.NewUserQuickPlayLogin("Jack"); uGame.GetInGameRoom(); uGame.ResetTimer(); var second = info.GetCurrentStoryInfo(); var resetTimer = second.GetVotingStart(); //see ResetGameTimerTest in GameTests.cs //since the timer cannot be reset by the non-Moderator-user, the 2 variables are the same Assert.True(initialTimer == resetTimer); }