public void TestForOldestYoungestRandom() { ICollection <IClusterNode> nodes = _grid1.GetCluster().GetNodes(); IClusterGroup prj = _grid1.GetCluster().ForYoungest(); Assert.AreEqual(1, prj.GetNodes().Count); Assert.IsTrue(nodes.Contains(prj.GetNode())); prj = _grid1.GetCluster().ForOldest(); Assert.AreEqual(1, prj.GetNodes().Count); Assert.IsTrue(nodes.Contains(prj.GetNode())); prj = _grid1.GetCluster().ForRandom(); Assert.AreEqual(1, prj.GetNodes().Count); Assert.IsTrue(nodes.Contains(prj.GetNode())); }
public void TestForAttribute() { ICollection <IClusterNode> nodes = _grid1.GetCluster().GetNodes(); IClusterGroup prj = _grid1.GetCluster().ForAttribute("my_attr", "value1"); Assert.AreEqual(1, prj.GetNodes().Count); Assert.IsTrue(nodes.Contains(prj.GetNode())); Assert.AreEqual("value1", prj.GetNodes().First().GetAttribute <string>("my_attr")); }