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); }
public void BrightClusterConnectionConstructorTest() { BrightClusterConnection target = new BrightClusterConnection(); Assert.IsNotNull(target); Assert.IsInstanceOfType(target, typeof(ClusterConnection)); Assert.IsInstanceOfType(target, typeof(BrightClusterConnection)); Assert.IsNull(target.Connection()); }
public void ConnectionTest() { BrightClusterConnection target = new BrightClusterConnection(); Assert.IsNull(target.Connection()); target.Init(url, user, password); Assert.IsNotNull(target.Connection()); Assert.IsInstanceOfType(target.Connection(), typeof(BrightClusterShell)); BrightClusterShell s = (BrightClusterShell)target.Connection(); var result = s.RunCommands(new List <string> { "help" }); Assert.IsTrue(result.Contains("alias")); Assert.IsTrue(result.Contains("user")); }
public void BrightClusterConnectionWithoutInitGetLatestMetricDataTest() { BrightClusterConnection target = new BrightClusterConnection(); target.GetLatestMetricData("bla", "bla"); }
public void BrightClusterConnectionWithoutInitNodesTest() { BrightClusterConnection target = new BrightClusterConnection(); target.Nodes(); }
public void MyTestInitialize() { target = new BrightClusterConnection(); target.Init(url, user, password); }
public void BrightClusterConnectionWithoutInitGetSysInfoTest() { BrightClusterConnection target = new BrightClusterConnection(); target.GetSysinfo("bla", "bla"); }