public void CopyConnectionTest() { ClusterConnection c = target.CopyConnection(); Assert.IsInstanceOfType(c, typeof(ClusterConnection)); Assert.IsInstanceOfType(c, typeof(BrightClusterConnection)); Assert.IsInstanceOfType(c.Connection(), typeof(BrightClusterShell)); Assert.AreNotSame(c.Connection(), target.Connection()); BrightClusterShell s1 = (BrightClusterShell)target.Connection(); BrightClusterShell s2 = (BrightClusterShell)c.Connection(); Assert.AreEqual(s1.password, s2.password); Assert.AreEqual(s1.username, s2.username); Assert.AreEqual(s1.url, s2.url); BrightClusterConnection con = (BrightClusterConnection)c; Assert.AreEqual(target.password, con.password); Assert.AreEqual(s1.password, target.password); Assert.AreEqual(target.username, con.username); Assert.AreEqual(s1.username, target.username); Assert.AreEqual(target.url, con.url); Assert.AreEqual(s1.url, target.url); }