public void ShouldHydrateAndTimeHydrateReturnInformations() { var writeSrv = new TestWriteService(); const string expectedMessageToWrite = "Il n'a jamais bu Kappa"; const string command = "timehydrate"; TextCommands.Execute(command, writeSrv); writeSrv.WrittenChat.Should().Be(expectedMessageToWrite); var writeSrv0 = new TestWriteService(); const string command0 = "hydrate"; TextCommands.Execute(command0, writeSrv0); writeSrv0.WrittenChat.Should().BeOneOf(TextCommands.HydrateResults); Thread.Sleep(300); writeSrv = new TestWriteService(); const string expectedMessageToWrite2 = "Il a bu pour la dernière fois, il y a 0.005 minute(s)."; const string command2 = "timehydrate"; TextCommands.Execute(command2, writeSrv); writeSrv.WrittenChat.Should().Be(expectedMessageToWrite2); }
public void ShouldExecuteFalseCommandDoNothing() { var writeSrv = new TestWriteService(); const string command = "notACommand"; TextCommands.Execute(command, writeSrv); writeSrv.WrittenChat.Should().BeNull(); }
public void ShouldIndelivrablesCommandWriteSpecificMsg() { var writeSrv = new TestWriteService(); const string expectedMessageToWrite = "Allez tous regarder la chaîne YouTube des Indélivrables : https://www.youtube.com/channel/UCl7djHZZcnOt-t05QMYx90g"; const string command = "indelivrables"; TextCommands.Execute(command, writeSrv); writeSrv.WrittenChat.Should().Be(expectedMessageToWrite); }
public void ShouldGiveUpCommandWriteSpecificMsg() { var writeSrv = new TestWriteService(); const string expectedMessageToWrite = "https://www.youtube.com/watch?v=dQw4w9WgXcQ LUL"; const string command = "giveup"; TextCommands.Execute(command, writeSrv); writeSrv.WrittenChat.Should().Be(expectedMessageToWrite); }
public void ShouldRigCommandWriteSpecificMsg() { var writeSrv = new TestWriteService(); const string expectedMessageToWrite = "Il a 4 écrans et il ne parle que de ça..."; const string command = "rig"; TextCommands.Execute(command, writeSrv); writeSrv.WrittenChat.Should().Be(expectedMessageToWrite); }
public void ShouldBonjourCommandWriteSpecificMsg() { var writeSrv = new TestWriteService(); const string expectedMessageToWrite = "HeyGuys"; const string command = "bonjour"; TextCommands.Execute(command, writeSrv); writeSrv.WrittenChat.Should().Be(expectedMessageToWrite); }
public void ShouldTotoCommandWriteSpecificMsg() { var writeSrv = new TestWriteService(); const string expectedMessageToWrite = "Votre langage est très évolué."; const string command = "toto"; TextCommands.Execute(command, writeSrv); writeSrv.WrittenChat.Should().Be(expectedMessageToWrite); }
public void ShouldHelpCommandWriteSpecificMsg() { var writeSrv = new TestWriteService(); const string expectedMessageToWrite = "Liste des commandes : '!Help' '!Hydrate' '!Toto' '!Bonjour' '!Rig' '!Indelivrables' '!GiveUp' '!TimeHydrate' '!Discord Pub'"; const string command = "help"; TextCommands.Execute(command, writeSrv); writeSrv.WrittenChat.Should().Be(expectedMessageToWrite); }
public static void DoAction(OnMessageReceivedArgs e, TwitchClient client) { var writeSrv = new WriteService(client, e.ChatMessage.Channel); string message = e.ChatMessage.Message; string command = GetCommand(message); if (command == null) { return; } DiscordCommands.Execute(command, writeSrv); TextCommands.Execute(command, writeSrv); }