示例#1
0
        public void FrameUpdateCallbackInterfaceAddFrameUpdateCallback()
        {
            tlog.Debug(tag, $"FrameUpdateCallbackInterfaceAddFrameUpdateCallback START");

            var testingTarget = new MyFrameUpdateCallbackInterface();

            Assert.IsNotNull(testingTarget, "Can't create success object FrameUpdateCallbackInterface");
            Assert.IsInstanceOf <FrameUpdateCallbackInterface>(testingTarget, "Should return FrameUpdateCallbackInterface instance.");

            try
            {
                NUIApplication.GetDefaultWindow().AddFrameUpdateCallback(testingTarget);
                NUIApplication.GetDefaultWindow().RemoveFrameUpdateCallback(testingTarget);
            }
            catch (Exception e)
            {
                Assert.Fail("Caught Exception" + e.ToString());
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"FrameUpdateCallbackInterfaceAddFrameUpdateCallback END (OK)");
        }
示例#2
0
        public void FrameUpdateCallbackInterfaceOnUpdate()
        {
            tlog.Debug(tag, $"FrameUpdateCallbackInterfaceOnUpdate START");

            var testingTarget = new MyFrameUpdateCallbackInterface();

            Assert.IsNotNull(testingTarget, "Can't create success object FrameUpdateCallbackInterface");
            Assert.IsInstanceOf <FrameUpdateCallbackInterface>(testingTarget, "Should return FrameUpdateCallbackInterface instance.");

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

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