public void maintains_message_state() { theMessageBody .ToString() .Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries) .Each(line => { if (line.Trim() == ".") { return; } var token = SmtpToken.FromLine(line); theHandler.Handle(token, theSession); }); theHandler.CurrentMessage.ShouldNotBeEmpty(); theHandler.Matches(new SmtpToken { IsMessageBody = false }); theHandler.CurrentMessage.ShouldBeEmpty(); }
private void verifyToken(string input, Action <SmtpToken> action) { action(SmtpToken.FromLine(input)); }