Пример #1
0
        public void TestCheck()
        {
            SingletonProvider<TestSetup>.Instance.AddAccount(_domain, "*****@*****.**", "test");

             var oSimulator = new IMAPClientSimulator();

             string sWelcomeMessage = oSimulator.Connect();
             oSimulator.Logon("*****@*****.**", "test");
             CustomAssert.IsTrue(oSimulator.CreateFolder("TestFolder"));
             CustomAssert.IsTrue(oSimulator.CheckFolder("TestFolder"));
             oSimulator.Disconnect();
        }
Пример #2
0
        public void TestBeforeLogon()
        {
            Account oAccount = SingletonProvider<TestSetup>.Instance.AddAccount(_domain, "*****@*****.**", "test");

             var oSimulator = new IMAPClientSimulator();

             string sWelcomeMessage = oSimulator.Connect();

             CustomAssert.IsTrue(oSimulator.ExamineFolder("NonexistantFolder").Contains("NO Authenticate first"));
             CustomAssert.IsFalse(oSimulator.SelectFolder("NonexistantFolder"));
             CustomAssert.IsFalse(oSimulator.Copy(1, "SomeFolder"));
             CustomAssert.IsFalse(oSimulator.CheckFolder("SomeFolder"));
             CustomAssert.IsTrue(oSimulator.Fetch("123 a").Contains("NO Authenticate first"));
             CustomAssert.IsTrue(oSimulator.List().Contains("NO Authenticate first"));
             CustomAssert.IsTrue(oSimulator.LSUB().Contains("NO Authenticate first"));
             CustomAssert.IsTrue(oSimulator.GetMyRights("APA").Contains("NO Authenticate first"));
             CustomAssert.IsFalse(oSimulator.RenameFolder("A", "B"));
             CustomAssert.IsFalse(oSimulator.Status("SomeFolder", "MESSAGES").Contains("A01 OK"));
        }