コード例 #1
0
        public void SetUp()
        {
            theSession = MockRepository.GenerateStub<ISmtpSession>();
            theHandler = new HeloHandler();
            theToken = new SmtpToken();

            theSession.Stub(x => x.RemoteAddress).Return("1234");
        }
コード例 #2
0
        public void SetUp()
        {
            theSession = MockRepository.GenerateStub <ISmtpSession>();
            theHandler = new HeloHandler();
            theToken   = new SmtpToken();

            theSession.Stub(x => x.RemoteAddress).Return("1234");
        }
コード例 #3
0
        public void SetUp()
        {
            theHandler = new MessageParsingHandler();

            theMessageBody = new StringBuilder();
            theMessageBody.AppendLine("MIME-Version: 1.0");
            theMessageBody.AppendLine("From: [email protected]");
            theMessageBody.AppendLine("To: [email protected], [email protected]");
            theMessageBody.AppendLine("Cc: [email protected]");
            theMessageBody.AppendLine("Subject: This is a test");
            theMessageBody.AppendLine("Content-Type: text/plain; charset=us-ascii");
            theMessageBody.AppendLine("Content-Transfer-Encoding: quoted-printable");
            theMessageBody.AppendLine();
            theMessageBody.AppendLine("This is the body");
            theMessageBody.AppendLine().AppendLine(".").AppendLine();

            theRecipients = new List <string>();
            theSession    = MockRepository.GenerateStub <ISmtpSession>();

            theSession.Stub(x => x.Recipients).Return(theRecipients);

            theMessage = theHandler.CreateMessage(theMessageBody, theSession);
        }
コード例 #4
0
        public void SetUp()
        {
            theHandler = new MessageParsingHandler();

            theMessageBody = new StringBuilder();
            theMessageBody.AppendLine("MIME-Version: 1.0");
            theMessageBody.AppendLine("From: [email protected]");
            theMessageBody.AppendLine("To: [email protected], [email protected]");
            theMessageBody.AppendLine("Cc: [email protected]");
            theMessageBody.AppendLine("Subject: This is a test");
            theMessageBody.AppendLine("Content-Type: text/plain; charset=us-ascii");
            theMessageBody.AppendLine("Content-Transfer-Encoding: quoted-printable");
            theMessageBody.AppendLine();
            theMessageBody.AppendLine("This is the body");
            theMessageBody.AppendLine().AppendLine(".").AppendLine();

            theRecipients = new List<string>();
            theSession = MockRepository.GenerateStub<ISmtpSession>();

            theSession.Stub(x => x.Recipients).Return(theRecipients);

            theMessage = theHandler.CreateMessage(theMessageBody, theSession);
        }