public void TextEditorGetFontStyle() { tlog.Debug(tag, $"TextEditorGetFontStyle START"); var testingTarget = new TextEditor(true); Assert.IsNotNull(testingTarget, "Can't create success object TextEditor"); Assert.IsInstanceOf <TextEditor>(testingTarget, "Should be an instance of TextEditor type."); var setFontStyle = new Tizen.NUI.Text.FontStyle() { Width = FontWidthType.Condensed, Weight = FontWeightType.Light, Slant = FontSlantType.Italic, }; testingTarget.SetFontStyle(setFontStyle); var getFontStyle = testingTarget.GetFontStyle(); Assert.AreEqual(getFontStyle.Width, setFontStyle.Width, "Should be equal!"); Assert.AreEqual(getFontStyle.Weight, setFontStyle.Weight, "Should be equal!"); Assert.AreEqual(getFontStyle.Slant, setFontStyle.Slant, "Should be equal!"); testingTarget.Dispose(); tlog.Debug(tag, $"TextEditorGetFontStyle END (OK)"); }
public void FontStyleEquals() { tlog.Debug(tag, $"FontStyleEquals START"); var fontStyle = new Tizen.NUI.Text.FontStyle(); Assert.IsNotNull(fontStyle, "Can't create success object strikethrough"); Assert.IsInstanceOf <Tizen.NUI.Text.FontStyle>(fontStyle, "Should be an instance of fontStyle type."); var compare = new Tizen.NUI.Text.FontStyle(); Assert.IsTrue(fontStyle == compare, "Should be true!"); Assert.AreEqual(fontStyle.GetHashCode(), compare.GetHashCode(), "Should be true!"); compare.Slant = FontSlantType.Italic; Assert.IsTrue(fontStyle != compare, "Should be true!"); tlog.Debug(tag, $"FontStyleEquals END (OK)"); }