3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
6 using System.Reflection;
7 using System.Collections.Generic;
8 using Tizen.NUI.Binding;
10 namespace Tizen.NUI.Devel.Tests
12 using tlog = Tizen.Log;
15 [Description("internal/XamlBinding/DeviceInfo")]
16 public class InternalDeviceInfoTest
18 private const string tag = "NUITEST";
20 internal class MyDeviceInfo : DeviceInfo
22 public override Size PixelScreenSize => new Size(100,100);
24 public override Size ScaledScreenSize => new Size(100, 100);
26 public override double ScalingFactor => 1.0f;
32 tlog.Info(tag, "Init() is called!");
38 tlog.Info(tag, "Destroy() is called!");
43 [Description("DeviceInfo constructor")]
44 [Property("SPEC", "Tizen.NUI.Binding.DeviceInfo.DeviceInfo C")]
45 [Property("SPEC_URL", "-")]
46 [Property("CRITERIA", "CONSTR")]
47 public void DeviceInfoConstructor()
49 tlog.Debug(tag, $"DeviceInfoConstructor START");
51 var testingTarget = new MyDeviceInfo();
52 Assert.IsNotNull(testingTarget, "Can't create success object DeviceInfo.");
53 Assert.IsInstanceOf<MyDeviceInfo>(testingTarget, "Should return DeviceInfo instance.");
55 Assert.AreEqual(1.0, testingTarget.DisplayRound(1.0), "Should be equal");
56 var ret = testingTarget.CurrentOrientation;
57 testingTarget.CurrentOrientation = ret;
58 Assert.AreEqual(ret, testingTarget.CurrentOrientation, "Should be equal");
59 testingTarget.CurrentOrientation = DeviceOrientation.Other;
60 Assert.AreEqual(DeviceOrientation.Other, testingTarget.CurrentOrientation, "Should be equal");
62 testingTarget.Dispose();
63 tlog.Debug(tag, $"DeviceInfoConstructor END");