public void ShouldAddArrayOfNewThemes() { var topTenGame = new mod.TopTenGame(); var themesToAdd = GetArrayOfThemes().ToList(); List <string> expectedListOfThemes = themesToAdd.ToList(); topTenGame.RegisterTheme(themesToAdd.ToArray()); topTenGame.Themes.Should().BeEquivalentTo(expectedListOfThemes); }
public void ShouldPopFirstTheme() { var topTenGame = new mod.TopTenGame(); const string expectedTheme = "New theme"; List <string> expectedThemesList = new List <string>(); topTenGame.RegisterTheme(expectedTheme); string theme = topTenGame.GetNextTheme(); theme.Should().Be(expectedTheme); topTenGame.Themes.Should().BeEquivalentTo(expectedThemesList); }
public void ShouldRegisterTopTenTheme() { //Given var topTenGame = new mod.TopTenGame(); const string theme = "Thème 1"; List <string> themesList = new List <string> { theme }; //With topTenGame.RegisterTheme(theme); //Then topTenGame.Themes.Should().BeEquivalentTo(themesList); }
public void ShouldResetTopTenGameParams() { //Given var topTenGame = new mod.TopTenGame(); const ulong idMsg = 25; topTenGame.StoreRegisterMsg(idMsg); topTenGame.RegisterMsgId.Should().Be(idMsg); const string theme = "Thème 1"; List <string> themesList = new List <string> { theme }; topTenGame.RegisterTheme(theme); topTenGame.Themes.Should().BeEquivalentTo(themesList); const string player = "Player 1"; List <string> playersList = new List <string> { player }; topTenGame.RegisterUser(player); topTenGame.Users.Should().BeEquivalentTo(playersList); const ulong expectedIdMsg = 0; List <string> themesListExpected = new List <string> { }; List <string> playersListExpected = new List <string> { }; const bool expectedCaptenPresence = false; topTenGame.NextCapten(); //With topTenGame.Clear(); //Then topTenGame.RegisterMsgId.Should().Be(expectedIdMsg); topTenGame.Themes.Should().BeEquivalentTo(themesListExpected); topTenGame.Users.Should().BeEquivalentTo(playersListExpected); topTenGame.HasCapten.Should().Be(expectedCaptenPresence); }