Beispiel #1
0
        public void MenuItemOnUpdate()
        {
            tlog.Debug(tag, $"MenuItemOnUpdate START");

            var testingTarget = new MyMenuItem();

            Assert.IsNotNull(testingTarget, "null handle");
            Assert.IsInstanceOf <MenuItem>(testingTarget, "Should return MenuItem instance.");

            try
            {
                testingTarget.MyOnUpdate();
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"MenuItemOnUpdate END (OK)");
        }
Beispiel #2
0
        public void MenuItemHandleControlStateOnTouch()
        {
            tlog.Debug(tag, $"MenuItemHandleControlStateOnTouch START");

            var testingTarget = new MyMenuItem()
            {
                Text            = "MenuItem",
                Size            = new Size(100, 200),
                BackgroundColor = Color.Green,
                IsEnabled       = true,
            };

            Assert.IsNotNull(testingTarget, "null handle");
            Assert.IsInstanceOf <MenuItem>(testingTarget, "Should return MenuItem instance.");

            using (Touch touch = new Touch())
            {
                tlog.Debug(tag, "HandleControlStateOnTouch : " + testingTarget.MyHandleControlStateOnTouch(touch));
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"MenuItemHandleControlStateOnTouch END (OK)");
        }