public void SmtpReplyParseByteArray() { byte[] message = Encoding.ASCII.GetBytes("205 Smtp Reply BaseMessage"); SmtpReply smtp = new SmtpReply(message, 0, message.Length); Assert.AreEqual(205, smtp.Code); Assert.AreEqual(smtp.Message, "Smtp Reply BaseMessage"); }
public void MessageWithCodeLessThanMin() { SmtpReply smtp = new SmtpReply(10, string.Empty); }
public void MessageWithCodeGreaterThanMax() { SmtpReply smtp = new SmtpReply(1000, string.Empty); }
public void MessageWithBoundsOverload() { byte[] message = Encoding.ASCII.GetBytes("205 Smtp Reply BaseMessage Without Code"); SmtpReply smtp = new SmtpReply(message, 0, message.Length + 10); }
public void MessageWithNegativeOffset() { byte[] message = Encoding.ASCII.GetBytes("205 Smtp Reply BaseMessage Without Code"); SmtpReply smtp = new SmtpReply(message, -1, message.Length); }
public void InvalidReplyException() { byte[] message = Encoding.ASCII.GetBytes("Smtp Reply BaseMessage Without Code"); SmtpReply smtp = new SmtpReply(message, 0, message.Length); }