public void TestImapClientGreetingCapabilities ()
{
var commands = new List<ImapReplayCommand> ();
commands.Add (new ImapReplayCommand ("", "common.capability-greeting.txt"));
using (var client = new ImapClient ()) {
try {
client.ReplayConnect ("localhost", new ImapReplayStream (commands, false), CancellationToken.None);
} catch (Exception ex) {
Assert.Fail ("Did not expect an exception in Connect: {0}", ex);
}
Assert.IsTrue (client.IsConnected, "Client failed to connect.");
Assert.AreEqual (GreetingCapabilities, client.Capabilities);
Assert.AreEqual (1, client.AuthenticationMechanisms.Count);
Assert.IsTrue (client.AuthenticationMechanisms.Contains ("PLAIN"), "Expected SASL PLAIN auth mechanism");
}
}