Example #1
0
 public virtual void ProcessExamineCommand(ExamineCommand cmd)
 {
     this.Session.AppendResponse(
         new ServerStatusResponse(cmd.Tag,
                                  ServerStatusResponseType.NO,
                                  "EXAMINE State Error")
         );
 }
Example #2
0
        public override void ProcessExamineCommand(ExamineCommand cmd)
        {
            MailBox mailbox = store.GetMailbox(cmd.MailBox);

            if (mailbox == null)
            {
                this.Session.AppendResponse(
                    new ServerStatusResponse(
                        cmd.Tag,
                        ServerStatusResponseType.NO,
                        "EXAMINE fail. Mailbox not found.")
                    );
                return;
            }

            this.Session.ChangeState(new SelectedState(this.Session, this.User, mailbox));
            this.Session.AppendResponse(
                new ServerStatusResponse(
                    cmd.Tag,
                    ServerStatusResponseType.OK,
                    "EXAMINE completed",
                    new ResponseCode(ResponseCodeType.READONLY))
                );
        }
Example #3
0
 public void Before_Each_Test()
 {
     mock = MockRepository.GenerateMock <IConsoleFacade>();
     cmd  = new ExamineCommand(mock);
 }