コード例 #1
0
        public void XamlPropertyConditionConstructor()
        {
            tlog.Debug(tag, $"XamlPropertyConditionConstructor START");
            XamlPropertyCondition xp = new XamlPropertyCondition();

            Assert.IsNotNull(xp, "Should not be null");
            tlog.Debug(tag, $"XamlPropertyConditionConstructor END");
        }
コード例 #2
0
        public void PropertyTest3()
        {
            tlog.Debug(tag, $"PropertyTest3 START");
            XamlPropertyCondition xp = new XamlPropertyCondition();

            Assert.IsNotNull(xp, "Should not be null");
            var b = View.FocusableProperty;

            xp.IsSealed = true;
            Assert.Throws <InvalidOperationException>(() => xp.Property = b);
            tlog.Debug(tag, $"PropertyTest3 END");
        }
コード例 #3
0
        public void PropertyTest()
        {
            tlog.Debug(tag, $"PropertyTest START");
            XamlPropertyCondition xp = new XamlPropertyCondition();

            Assert.IsNotNull(xp, "Should not be null");
            var ret = xp.Property; //null

            Assert.IsNull(ret, "Should be null");
            xp.Property = ret;
            tlog.Debug(tag, $"PropertyTest END");
        }
コード例 #4
0
        public void ValueTest3()
        {
            tlog.Debug(tag, $"ValueTest3 START");

            XamlPropertyCondition xp = new XamlPropertyCondition();

            Assert.IsNotNull(xp, "Should not be null");
            xp.IsSealed = true;
            Assert.Throws <InvalidOperationException>(() => xp.Value = true);

            tlog.Debug(tag, $"ValueTest3 END");
        }
コード例 #5
0
        public void PropertyTest2()
        {
            tlog.Debug(tag, $"PropertyTest2 START");
            XamlPropertyCondition xp = new XamlPropertyCondition();

            Assert.IsNotNull(xp, "Should not be null");
            var b = View.FocusableProperty;

            xp.Property = b;
            var ret = xp.Property; //null

            Assert.AreEqual(b, ret, "Should be equal");

            tlog.Debug(tag, $"PropertyTest2 END");
        }
コード例 #6
0
        public void TearDownTest()
        {
            tlog.Debug(tag, $"TearDownTest START");
            try
            {
                XamlPropertyCondition xp = new XamlPropertyCondition();
                Assert.IsNotNull(xp, "Should not be null");
                xp.TearDown(new View());
            }
            catch (Exception e)
            {
                Assert.Fail("Should not thow exception: " + e.Message);
            }

            tlog.Debug(tag, $"TearDownTest END");
        }
コード例 #7
0
        public void GetStateTest()
        {
            tlog.Debug(tag, $"GetStateTest START");
            try {
                XamlPropertyCondition xp = new XamlPropertyCondition();
                Assert.IsNotNull(xp, "Should not be null");
                var ret = xp.GetState(new View());
                Assert.AreEqual(false, ret, "Should be equal");
            }
            catch (Exception e)
            {
                Assert.Fail("Should not thow exception: " + e.Message);
            }

            tlog.Debug(tag, $"GetStateTest END");
        }
コード例 #8
0
 public void ValueTest2()
 {
     tlog.Debug(tag, $"ValueTest2 START");
     try
     {
         XamlPropertyCondition xp = new XamlPropertyCondition();
         Assert.IsNotNull(xp, "Should not be null");
         xp.Value = true;
         Assert.AreEqual(true, xp.Value, "Should be equal");
     }
     catch (Exception e)
     {
         Assert.Fail("Should not thow exception: " + e.Message);
     }
     tlog.Debug(tag, $"ValueTest2 END");
 }
コード例 #9
0
        public void SetUpTest()
        {
            tlog.Debug(tag, $"SetUpTest START");
            try
            {
                XamlPropertyCondition xp = new XamlPropertyCondition();
                Assert.IsNotNull(xp, "Should not be null");
                xp.Value = true;
                xp.SetUp(new View());
            }
            catch (Exception e)
            {
                Assert.True(true, "Should thow exception: " + e.Message);
            }

            tlog.Debug(tag, $"SetUpTest END");
        }
コード例 #10
0
 public void ValueTest()
 {
     tlog.Debug(tag, $"ValueTest START");
     try
     {
         XamlPropertyCondition xp = new XamlPropertyCondition();
         Assert.IsNotNull(xp, "Should not be null");
         var ret = xp.Value;
         Assert.IsNotNull(xp, "Should not be null");
         xp.Value = ret;
     }
     catch (Exception e)
     {
         Assert.Fail("Should not thow exception: " + e.Message);
     }
     tlog.Debug(tag, $"ValueTest END");
 }