public void FailoverTransportWithBackupsTest()
{
Uri uri = new Uri("failover:(mock://localhost:61616,mock://localhost:61618)?transport.randomize=false&transport.backup=true");
FailoverTransportFactory factory = new FailoverTransportFactory();
using(ITransport transport = factory.CreateTransport(uri))
{
Assert.IsNotNull(transport);
transport.Command = OnCommand;
transport.Exception = OnException;
FailoverTransport failover = transport.Narrow(typeof(FailoverTransport)) as FailoverTransport;
Assert.IsNotNull(failover);
Assert.IsFalse(failover.Randomize);
Assert.IsTrue(failover.Backup);
transport.Start();
Thread.Sleep(1000);
Assert.IsTrue(failover.IsConnected);
}
}