Exemple #1
0
        public void GetHashCodeTest()
        {
            var disp1 = new ValueCluster("dis2", "cond", "sort", 20, true);
            var disp2 = new ValueCluster("dis2", "cond", "sort", 20);

            Assert.AreEqual(disp1.GetHashCode(), disp2.GetHashCode());
        }
Exemple #2
0
        public void CloneTest()
        {
            var src = new ValueCluster("dis", 10);
            var tst = src.Clone();

            Assert.AreEqual(src.Display, tst.Display);
            Assert.AreEqual(src.Count, tst.Count);
        }
Exemple #3
0
        public void EqualsTest()
        {
            var src  = new ValueCluster("dis", "cond", "sort", 10);
            var dest = new ValueCluster("dis", "cond2", "sort", 10);

            Assert.IsFalse(src.Equals(dest));
            Assert.IsTrue(src.Equals(src));
            Assert.IsTrue(src.Equals((object)src));
        }
Exemple #4
0
        public void EqualsTest()
        {
            var src  = new ValueCluster("dis", 10);
            var dest = new ValueCluster("dis2", 20);

            Assert.IsFalse(src.Equals(dest));
            Assert.IsTrue(src.Equals(src));
            src.CopyTo(dest);
            Assert.IsTrue(src.Equals(dest));
        }
Exemple #5
0
        public void CopyToTest()
        {
            var src  = new ValueCluster("dis", 10);
            var dest = new ValueCluster("dis2", 20);

            src.CopyTo(dest);

            Assert.AreEqual(src.Display, dest.Display);
            Assert.AreEqual(src.Count, dest.Count);
        }
Exemple #6
0
        public void ValueClusterCtor()
        {
            var tst1 = new ValueCluster();

            Assert.AreEqual("", tst1.Display);
            Assert.AreEqual(0, tst1.Count);

            var tst2 = new ValueCluster("dis", 10);

            Assert.AreEqual("dis", tst2.Display);
            Assert.AreEqual(10, tst2.Count);
        }
Exemple #7
0
        public void ValueClusterCtor()
        {
            var tst1 = new ValueCluster("text", "SQl", "Sort", 0);

            Assert.AreEqual("text", tst1.Display);
            Assert.AreEqual(0, tst1.Count);

            var tst2 = new ValueCluster("dis", "cond", "sort", 10);

            Assert.AreEqual("dis", tst2.Display);
            Assert.AreEqual(10, tst2.Count);

            tst2.Active = true;
            Assert.IsTrue(tst2.Active);

            tst2.Active = false;
            Assert.IsFalse(tst2.Active);
        }
Exemple #8
0
        public void ToStringTest()
        {
            var disp = new ValueCluster("dis2", 20).ToString();

            Assert.AreEqual("dis2 20 items", disp);
        }