public void TextLabelGetTextFit() { tlog.Debug(tag, $"TextLabelGetTextFit START"); var testingTarget = new TextLabel(true); Assert.IsNotNull(testingTarget, "Can't create success object TextLabel"); Assert.IsInstanceOf <TextLabel>(testingTarget, "Should be an instance of TextLabel type."); var setTextFit = new Tizen.NUI.Text.TextFit() { Enable = true, MinSize = 30.0f, MaxSize = 200.0f, StepSize = 1.0f, FontSizeType = FontSizeType.PointSize, }; testingTarget.SetTextFit(setTextFit); var getTextFit = testingTarget.GetTextFit(); Assert.AreEqual(getTextFit.Enable, setTextFit.Enable, "Should be equal!"); Assert.AreEqual(getTextFit.MinSize, setTextFit.MinSize, "Should be equal!"); Assert.AreEqual(getTextFit.MaxSize, setTextFit.MaxSize, "Should be equal!"); Assert.AreEqual(getTextFit.StepSize, setTextFit.StepSize, "Should be equal!"); Assert.AreEqual(getTextFit.FontSizeType, setTextFit.FontSizeType, "Should be equal!"); testingTarget.Dispose(); tlog.Debug(tag, $"TextLabelGetTextFit END (OK)"); }
public void TextFitEquals() { tlog.Debug(tag, $"TextFitEquals START"); var textFit = new Tizen.NUI.Text.TextFit(); Assert.IsNotNull(textFit, "Can't create success object strikethrough"); Assert.IsInstanceOf <Tizen.NUI.Text.TextFit>(textFit, "Should be an instance of textFit type."); var compare = new Tizen.NUI.Text.TextFit(); Assert.IsTrue(textFit == compare, "Should be true!"); Assert.AreEqual(textFit.GetHashCode(), compare.GetHashCode(), "Should be true!"); compare.StepSize = 10.0f; Assert.IsTrue(textFit != compare, "Should be true!"); tlog.Debug(tag, $"TextFitEquals END (OK)"); }