Пример #1
0
        public void Test_NotEqual_DiffName()
        {
            UIDef uiDef  = new UIDef("DDD", null, null);
            UIDef uiDef2 = new UIDef("DDD_1", null, null);

            Assert.IsFalse(uiDef.Equals(uiDef2));
            Assert.IsFalse(uiDef == uiDef2);
            Assert.IsTrue(uiDef != uiDef2);
        }
Пример #2
0
        public void Test_NotEqualsNull()
        {
            UIDef uiDef  = new UIDef("", null, null);
            UIDef uiDef2 = null;

            Assert.IsFalse(uiDef.Equals(uiDef2));
            Assert.IsFalse(uiDef == uiDef2);
            Assert.IsTrue(uiDef != uiDef2);
            Assert.AreNotEqual(uiDef, uiDef2);
        }
Пример #3
0
        public void Test_EqualHasTheSameUIForm()
        {
            UIForm uiForm = GetUiForm();
            UIDef  uiDef  = new UIDef("DDD", uiForm, null);
            UIDef  uiDef2 = new UIDef("DDD", uiForm, null);

            Assert.IsTrue(uiDef.Equals(uiDef2));
            Assert.IsTrue(uiDef == uiDef2);
            Assert.IsFalse(uiDef != uiDef2);
        }
Пример #4
0
        public void Test_NotEqual_OtherType()
        {
            //---------------Set up test pack-------------------
            UIDef uiDef = new UIDef("", null, null);

            //--------------Assert PreConditions----------------

            //---------------Execute Test ----------------------

            Assert.IsFalse(uiDef.Equals("BNLJ JOLJ"));
            //---------------Test Result -----------------------

            //---------------Tear Down -------------------------
        }
Пример #5
0
        public void TestCloneUIFormNull()
        {
            //---------------Set up test pack-------------------
            UIDef uiDef = new UIDef("Name", null, GetUiGrid());
            //--------------Assert PreConditions----------------

            //---------------Execute Test ----------------------
            IUIDef clonedDef = uiDef.Clone();

            //---------------Test Result -----------------------
            Assert.IsTrue(uiDef == (UIDef)clonedDef);
            Assert.IsTrue(uiDef.Equals(clonedDef));
            Assert.AreNotSame(uiDef, clonedDef);

            Assert.AreSame(null, clonedDef.UIForm);
            Assert.AreNotSame(uiDef.UIGrid, clonedDef.UIGrid);
            //---------------Tear Down -------------------------
        }
Пример #6
0
        public void TestCloneUIDef()
        {
            //---------------Set up test pack-------------------
            UIForm uiForm = GetUiForm();

            UIGrid uiGrid = GetUiGrid();

            UIDef uiDef = new UIDef("Name", uiForm, uiGrid);
            //---------------Execute Test ----------------------
            IUIDef clonedDef = uiDef.Clone();

            //---------------Test Result -----------------------
            Assert.IsTrue(uiDef == (UIDef)clonedDef);
            Assert.IsTrue(uiDef.Equals(clonedDef));
            Assert.AreNotSame(uiDef, clonedDef);

            Assert.AreNotSame(uiDef.UIForm, clonedDef.UIForm);
            Assert.AreNotSame(uiDef.UIGrid, clonedDef.UIGrid);
        }
Пример #7
0
        public void Test_NotEqual_UIFormDifferent()
        {
            //---------------Set up test pack-------------------

            UIForm uiForm = GetUiForm();

            UIDef uiDef  = new UIDef("DDD", uiForm, null);
            UIDef uiDef2 = new UIDef("DDD", null, null);

            //--------------Assert PreConditions----------------

            //---------------Execute Test ----------------------


            //---------------Test Result -----------------------

            Assert.IsFalse(uiDef.Equals(uiDef2));
            Assert.IsFalse(uiDef == uiDef2);
            Assert.IsTrue(uiDef != uiDef2);
            //---------------Tear Down -------------------------
        }
Пример #8
0
 private static void AssertNotEqual(UIDef uiDef, UIDef uiDef2)
 {
     Assert.IsFalse(uiDef.Equals(uiDef2));
     Assert.IsFalse(uiDef == uiDef2);
     Assert.IsTrue(uiDef != uiDef2);
 }
Пример #9
0
        public void TestCloneUIFormNull()
        {
            //---------------Set up test pack-------------------
            UIDef uiDef = new UIDef("Name", null, GetUiGrid());
            //--------------Assert PreConditions----------------            

            //---------------Execute Test ----------------------
            IUIDef clonedDef = uiDef.Clone();
            //---------------Test Result -----------------------
            Assert.IsTrue(uiDef == (UIDef) clonedDef);
            Assert.IsTrue(uiDef.Equals(clonedDef));
            Assert.AreNotSame(uiDef, clonedDef);

            Assert.AreSame(null, clonedDef.UIForm);
            Assert.AreNotSame(uiDef.UIGrid, clonedDef.UIGrid);
            //---------------Tear Down -------------------------          
        }
Пример #10
0
 private static void AssertNotEqual(UIDef uiDef, UIDef uiDef2)
 {
     Assert.IsFalse(uiDef.Equals(uiDef2));
     Assert.IsFalse(uiDef == uiDef2);
     Assert.IsTrue(uiDef != uiDef2);
 }
Пример #11
0
        public void Test_NotEqual_DiffName()
        {
            UIDef uiDef = new UIDef("DDD", null, null);
            UIDef uiDef2 = new UIDef("DDD_1", null, null);

            Assert.IsFalse(uiDef.Equals(uiDef2));
            Assert.IsFalse(uiDef == uiDef2);
            Assert.IsTrue(uiDef != uiDef2);
        }
Пример #12
0
        public void Test_EqualHasTheSameUIForm()
        {
            UIForm uiForm = GetUiForm();
            UIDef uiDef = new UIDef("DDD", uiForm, null);
            UIDef uiDef2 = new UIDef("DDD", uiForm, null);

            Assert.IsTrue(uiDef.Equals(uiDef2));
            Assert.IsTrue(uiDef == uiDef2);
            Assert.IsFalse(uiDef != uiDef2);
        }
Пример #13
0
        public void Test_NotEqual_UIFormDifferent()
        {
            //---------------Set up test pack-------------------

            UIForm uiForm = GetUiForm();

            UIDef uiDef = new UIDef("DDD", uiForm, null);
            UIDef uiDef2 = new UIDef("DDD", null, null);
            //--------------Assert PreConditions----------------            

            //---------------Execute Test ----------------------


            //---------------Test Result -----------------------

            Assert.IsFalse(uiDef.Equals(uiDef2));
            Assert.IsFalse(uiDef == uiDef2);
            Assert.IsTrue(uiDef != uiDef2);
            //---------------Tear Down -------------------------          
        }
Пример #14
0
        public void Test_NotEqual_OtherType()
        {
            //---------------Set up test pack-------------------
            UIDef uiDef = new UIDef("", null, null);
            //--------------Assert PreConditions----------------            

            //---------------Execute Test ----------------------

            Assert.IsFalse(uiDef.Equals("BNLJ JOLJ"));
            //---------------Test Result -----------------------

            //---------------Tear Down -------------------------          
        }
Пример #15
0
 public void Test_NotEqualsNull()
 {
     UIDef uiDef = new UIDef("", null, null);
     UIDef uiDef2 = null;
     Assert.IsFalse(uiDef.Equals(uiDef2));
     Assert.IsFalse(uiDef == uiDef2);
     Assert.IsTrue(uiDef != uiDef2);
     Assert.AreNotEqual(uiDef, uiDef2);
 }
Пример #16
0
        public void TestCloneUIDef()
        {
            //---------------Set up test pack-------------------
            UIForm uiForm = GetUiForm();

            UIGrid uiGrid = GetUiGrid();

            UIDef uiDef = new UIDef("Name", uiForm, uiGrid);
            //---------------Execute Test ----------------------
            IUIDef clonedDef = uiDef.Clone();

            //---------------Test Result -----------------------
            Assert.IsTrue(uiDef == (UIDef) clonedDef);
            Assert.IsTrue(uiDef.Equals(clonedDef));
            Assert.AreNotSame(uiDef, clonedDef);

            Assert.AreNotSame(uiDef.UIForm, clonedDef.UIForm);
            Assert.AreNotSame(uiDef.UIGrid, clonedDef.UIGrid);
        }