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

            var testingTarget = new DefaultFrameBroker(Window.Instance);

            Assert.IsNotNull(testingTarget, "Can't create success object CustomView");
            Assert.IsInstanceOf <DefaultFrameBroker>(testingTarget, "Should be an instance of DefaultFrameBroker type.");

            try
            {
                Tizen.Applications.AppControl appControl = new Tizen.Applications.AppControl();
                appControl.Operation     = Tizen.Applications.AppControlOperations.Call;
                appControl.ApplicationId = MyAppId;
                testingTarget.SendLaunchRequest(appControl, true);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            testingTarget.Dispose();

            tlog.Debug(tag, $"DefaultFrameBrokerSendLaunchRequest END (OK)");
        }
Beispiel #2
0
        public void FrameBrokerBaseSendLaunchRequestNullAppControl()
        {
            tlog.Debug(tag, $"FrameBrokerBaseSendLaunchRequestNullAppControl START");

            using (Window window = new Window(new Rectangle(0, 0, 100, 200), false))
            {
                var testingTarget = new DefaultFrameBroker(window);
                Assert.IsNotNull(testingTarget, "Can't create success object CustomView");
                Assert.IsInstanceOf <DefaultFrameBroker>(testingTarget, "Should be an instance of DefaultFrameBroker type.");

                try
                {
                    testingTarget.SendLaunchRequest(null, true);
                }
                catch (Exception e)
                {
                    testingTarget.Dispose();
                    tlog.Debug(tag, e.Message.ToString());
                    tlog.Debug(tag, $"FrameBrokerBaseSendLaunchRequestNullAppControl END (OK)");
                    Assert.Pass("Caught ArgumentException : Passed!");
                }
            }
        }