protected override void TestCleanup()
{
// Check whether the test cleanup process should be disabled.
if (this.CheckIfTestCaseDisabled())
{
return;
}
// Clean current user's mailbox.
this.ClearAllRules();
this.OxoruleAdapter.RopEmptyFolder(this.InboxFolderHandle, 0);
this.OxoruleAdapter.RopEmptyFolder(outBoxFolderHandle, 0);
this.OxoruleAdapter.RopEmptyFolder(this.DAFFolderHandle, 0);
this.OxoruleAdapter.RopEmptyFolder(sentItemsFolderHandle, 0);
Thread.Sleep(this.WaitForTheRuleToTakeEffect);
// Clean another user's mailbox.
if (this.testUser == TestUser.TestUser1)
{
// Logon testuser2.
this.LogonMailbox(TestUser.TestUser2);
}
else
{
// Logon testuser1.
this.LogonMailbox(TestUser.TestUser1);
}
this.ClearAllRules();
this.OxoruleAdapter.RopEmptyFolder(this.InboxFolderHandle, 0);
this.OxoruleAdapter.RopEmptyFolder(outBoxFolderHandle, 0);
this.OxoruleAdapter.RopEmptyFolder(this.DAFFolderHandle, 0);
this.OxoruleAdapter.RopEmptyFolder(sentItemsFolderHandle, 0);
this.OxoruleAdapter.CleanUp();
this.OxoruleAdapter.Reset();
Thread.Sleep(this.WaitForTheRuleToTakeEffect);
}