Beispiel #1
0
        public void BooleanGroupSync()
        {
            var syncVM = new RegistrySyncVM();

            Assert.AreEqual(true, syncVM.BoolRegItem5);
            Assert.AreEqual(false, syncVM.BoolRegItem6);

            syncVM.BoolRegItem5 = false;
            syncVM.BoolRegItem6 = true;
            Assert.AreEqual(false, BooleanGroupItem.GetItem(5));
            Assert.AreEqual(true, BooleanGroupItem.GetItem(6));

            BooleanGroupItem.SetItem(5, true);
            BooleanGroupItem.SetItem(6, false);
            Assert.AreEqual(true, syncVM.BoolRegItem5);
            Assert.AreEqual(false, syncVM.BoolRegItem6);
        }
Beispiel #2
0
        public void RegBooleanGroup()
        {
            var  item     = new RegBooleanGroup();
            bool eventRan = false;

            item.BooleanItemChanged += (s, e) =>
            {
                Assert.AreEqual(7, e.Pos);
                eventRan = true;
            };

            item.SetItem(7, true);
            Assert.IsTrue(eventRan);

            Assert.IsTrue(item.GetItem(7));

            item.SetItem(7, false);
            Assert.IsFalse(item.GetItem(7));
        }