Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public void ShouldUseInterface()
        {
            var          writeSrv = new TestWriteService();
            const string expectedMessageToWrite = "Message";

            writeSrv.WriteInChat(expectedMessageToWrite);
            writeSrv.WrittenChat.Should().Be(expectedMessageToWrite);
        }
Ejemplo n.º 3
0
        public void ShouldExecuteFalseCommandDoNothing()
        {
            var          writeSrv = new TestWriteService();
            const string command  = "notACommand";

            TextCommands.Execute(command, writeSrv);

            writeSrv.WrittenChat.Should().BeNull();
        }
Ejemplo n.º 4
0
        public void ShouldDiscordCommandReturnNothing()
        {
            const string discordCommandStr = "discord";
            var          writeSrv          = new TestWriteService();

            DiscordCommands.Execute(discordCommandStr, writeSrv);

            writeSrv.WrittenChat.Should().BeNull();
        }
Ejemplo n.º 5
0
        public void ShouldDiscordPubCommandReturnPub()
        {
            const string discordCommandStr  = "discord pub";
            const string expectedMsgToWrite = "Rejoignez le Discord de la communauté : https://discord.gg/PjNqJSY9E6. Des récompenses et droits supplémentaires pour les subs !";
            var          writeSrv           = new TestWriteService();

            DiscordCommands.Execute(discordCommandStr, writeSrv);

            writeSrv.WrittenChat.Should().Be(expectedMsgToWrite);
        }
Ejemplo n.º 6
0
        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);
        }
Ejemplo n.º 7
0
        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);
        }
Ejemplo n.º 8
0
        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);
        }
Ejemplo n.º 9
0
        public void ShouldBonjourCommandWriteSpecificMsg()
        {
            var          writeSrv = new TestWriteService();
            const string expectedMessageToWrite = "HeyGuys";
            const string command = "bonjour";

            TextCommands.Execute(command, writeSrv);

            writeSrv.WrittenChat.Should().Be(expectedMessageToWrite);
        }
Ejemplo n.º 10
0
        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);
        }
Ejemplo n.º 11
0
        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);
        }