public async Task DefaultTitleItemIconNull() { tlog.Debug(tag, $"DefaultTitleItem START"); TaskCompletionSource <bool> tcs = new TaskCompletionSource <bool>(false); EventHandler onRelayout = (s, e) => { tcs.TrySetResult(true); }; var testingTarget = new DefaultTitleItem("Tizen.NUI.Components.DefaultTitleItem"); testingTarget.Relayout += onRelayout; Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <DefaultTitleItem>(testingTarget, "should be an instance of testing target class!"); testingTarget.Label = new TextLabel() { Text = "test", }; Assert.IsNotNull(testingTarget.Label, "should be not null"); Window.Instance.Add(testingTarget); var result = await tcs.Task; Assert.IsTrue(result, "Relayout event should be invoked"); Assert.IsNotNull(testingTarget.Icon, "should be not null"); if (testingTarget != null) { Window.Instance.Remove(testingTarget); testingTarget.Dispose(); testingTarget = null; } tlog.Debug(tag, $"DefaultTitleItem END (OK)"); }
public void DefaultTitleItemConstructorWithStyle() { tlog.Debug(tag, $"DefaultTitleItem START"); var testingTarget = new DefaultTitleItem("Tizen.NUI.Components.DefaultTitleItem"); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <DefaultTitleItem>(testingTarget, "should be an instance of testing target class!"); testingTarget.Dispose(); tlog.Debug(tag, $"DefaultTitleItem END (OK)"); }
public void DefaultTitleItemText() { tlog.Debug(tag, $"DefaultTitleItem START"); var testingTarget = new DefaultTitleItem("Tizen.NUI.Components.DefaultTitleItem"); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <DefaultTitleItem>(testingTarget, "should be an instance of testing target class!"); testingTarget.Text = "test"; Assert.AreEqual(testingTarget.Text, "test", "should be equal."); testingTarget.Dispose(); tlog.Debug(tag, $"DefaultTitleItem END (OK)"); }
public void DefaultTitleItemIcon() { tlog.Debug(tag, $"DefaultTitleItem START"); var testingTarget = new DefaultTitleItem("Tizen.NUI.Components.DefaultTitleItem"); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <DefaultTitleItem>(testingTarget, "should be an instance of testing target class!"); testingTarget.Icon = new View() { Size = new Size(100, 100), }; Assert.IsNotNull(testingTarget.Icon, "should be not null"); testingTarget.Dispose(); tlog.Debug(tag, $"DefaultTitleItem END (OK)"); }
public void DefaultTitleItemConstructorWithItemStyle() { tlog.Debug(tag, $"DefaultTitleItem START"); var style = new DefaultTitleItemStyle() { SizeHeight = 60, Padding = new Extents(64, 64, 12, 12), Margin = new Extents(0, 0, 0, 0), BackgroundColor = new Selector <Color>() { Normal = new Color("#EEEEF1"), }, Label = new TextLabelStyle() { PixelSize = 28, Ellipsis = true, TextColor = new Color("#001447"), ThemeChangeSensitive = false }, Icon = new ViewStyle() { Margin = new Extents(40, 0, 0, 0) }, Seperator = new ViewStyle() { Margin = new Extents(0, 0, 0, 0), BackgroundColor = new Color(0, 0, 0, 0), }, }; var testingTarget = new DefaultTitleItem(style); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <DefaultTitleItem>(testingTarget, "should be an instance of testing target class!"); testingTarget.Dispose(); tlog.Debug(tag, $"DefaultTitleItem END (OK)"); }