Beispiel #1
0
            public void ThenShouldSetGatwayToWhatComesAfterExclamationPointButBeforeFirstSpace() //TODO: this is wrong, but I'm not dealing with it just yet
            {
                // Arrange
                var inputLine = ":[email protected] PRIVMSG ##wsb :test";

                //Act
                var ircMessage = IrcMessage.ParseInput(inputLine);

                //Assert
                Assert.That(ircMessage.Gateway, Is.EqualTo("[email protected]"));
            }
Beispiel #2
0
            public void ThenShouldSetSenderToWhatComesAfterColonButBeforeExclamationPoint()
            {
                // Arrange
                var inputLine = ":[email protected] PRIVMSG ##wsb :test";

                //Act
                var ircMessage = IrcMessage.ParseInput(inputLine);

                //Assert
                Assert.That(ircMessage.Sender, Is.EqualTo("hss"));
            }
Beispiel #3
0
            public void ThenShouldSetTargetToWhatComesAfterSecondSpaceButBeforeSpaceColon()
            {
                // Arrange
                var inputLine = ":[email protected] PRIVMSG ##wsb :test";

                //Act
                var ircMessage = IrcMessage.ParseInput(inputLine);

                //Assert
                Assert.That(ircMessage.Target, Is.EqualTo("##wsb"));
            }
Beispiel #4
0
            public void ThenShouldSetMessageToWhatComesAfterSpaceColonGivenMessageExists()
            {
                // Arrange
                var inputLine = ":[email protected] PRIVMSG ##wsb :test";

                //Act
                var ircMessage = IrcMessage.ParseInput(inputLine);

                //Assert
                Assert.That(ircMessage.Message, Is.EqualTo("test"));
            }