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

            if (IsWearable())
            {
                var dummyWatchTime = new WatchTime();
                Assert.IsNotNull(dummyWatchTime, "should be not null");
                Assert.IsInstanceOf <WatchTime>(dummyWatchTime, "should be an instance of testing target class!");

                AmbientTickEventArgs testingTarget = new AmbientTickEventArgs();
                testingTarget.WatchTime = dummyWatchTime;

                var result = testingTarget.WatchTime;
                Assert.IsNotNull(result, "should be not null.");
                Assert.AreEqual(dummyWatchTime, result, "Retrieved result should be equal to dummyApplication. ");

                dummyWatchTime.Dispose();
                tlog.Debug(tag, $"WatchApplicationAmbientTickEventArgsWatchTimeSet END (OK)");
            }
            else
            {
                tlog.Debug(tag, $"WatchApplicationAmbientTickEventArgsWatchTimeSet END (OK)");
                Assert.Pass("Not Supported profile");
            }
        }
Exemple #2
0
        public void WatchTimeGetWatchTimeFromPtr()
        {
            tlog.Debug(tag, $"WatchTimeGetWatchTimeFromPtr START");

            using (ImageView view = new ImageView())
            {
                var testingTarget = new WatchTime(view.SwigCPtr.Handle, false);
                Assert.IsNotNull(testingTarget, "should be not null");
                Assert.IsInstanceOf <WatchTime>(testingTarget, "Should be an instance of WatchTime type.");

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

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"WatchTimeGetWatchTimeFromPtr END (OK)");
        }
Exemple #3
0
        public void WatchTimeConstructor()
        {
            tlog.Debug(tag, $"WatchTimeConstructor START");

            using (ImageView view = new ImageView())
            {
                var testingTarget = new WatchTime(view.SwigCPtr.Handle, false);
                Assert.IsNotNull(testingTarget, "should be not null");
                Assert.IsInstanceOf <WatchTime>(testingTarget, "Should be an instance of WatchTime type.");

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"WatchTimeConstructor END (OK)");
        }
Exemple #4
0
        public void WatchTimeConstructor()
        {
            tlog.Debug(tag, $"WatchTimeConstructor START");

            if (IsWearable())
            {
                var testingTarget = new WatchTime();
                Assert.IsNotNull(testingTarget, "should be not null");
                Assert.IsInstanceOf <WatchTime>(testingTarget, "Should be an instance of WatchTime type.");

                testingTarget.Dispose();
                tlog.Debug(tag, $"WatchTimeConstructor END (OK)");
            }
            else
            {
                tlog.Debug(tag, $"WatchTimeConstructor END (OK)");
                Assert.Pass("Not Supported profile");
            }
        }
Exemple #5
0
        public void WatchTimeTimeZone()
        {
            tlog.Debug(tag, $"WatchTimeTimeZone START");

            if (IsWearable())
            {
                var testingTarget = new WatchTime();
                Assert.IsNotNull(testingTarget, "should be not null");
                Assert.IsInstanceOf <WatchTime>(testingTarget, "Should be an instance of WatchTime type.");

                string zone = testingTarget.TimeZone;
                Assert.IsNotEmpty(zone, "TimeZone is empty");

                testingTarget.Dispose();
                tlog.Debug(tag, $"WatchTimeTimeZone END (OK)");
            }
            else
            {
                tlog.Debug(tag, $"WatchTimeTimeZone END (OK)");
                Assert.Pass("Not Supported profile");
            }
        }
Exemple #6
0
        public void WatchTimeSecond()
        {
            tlog.Debug(tag, $"WatchTimeSecond START");

            if (IsWearable())
            {
                var testingTarget = new WatchTime();
                Assert.IsNotNull(testingTarget, "should be not null");
                Assert.IsInstanceOf <WatchTime>(testingTarget, "Should be an instance of WatchTime type.");

                int second = testingTarget.Second;
                Assert.IsTrue(second >= 0.0f);

                testingTarget.Dispose();
                tlog.Debug(tag, $"WatchTimeSecond END (OK)");
            }
            else
            {
                tlog.Debug(tag, $"WatchTimeSecond END (OK)");
                Assert.Pass("Not Supported profile");
            }
        }
Exemple #7
0
        public void WatchTimeDaylightSavingTimeStatus()
        {
            tlog.Debug(tag, $"WatchTimeDaylightSavingTimeStatus START");

            if (IsWearable())
            {
                var testingTarget = new WatchTime();
                Assert.IsNotNull(testingTarget, "should be not null");
                Assert.IsInstanceOf <WatchTime>(testingTarget, "Should be an instance of WatchTime type.");

                bool status = testingTarget.DaylightSavingTimeStatus;
                Assert.AreEqual(false, status, "Should be the default value");

                testingTarget.Dispose();
                tlog.Debug(tag, $"WatchTimeDaylightSavingTimeStatus END (OK)");
            }
            else
            {
                tlog.Debug(tag, $"WatchTimeDaylightSavingTimeStatus END (OK)");
                Assert.Pass("Not Supported profile");
            }
        }