[Property("SPEC", "Tizen.NUI.BaseComponents.TextEditor.ScrollStateChanged E")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "EVL")]
- [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]\r
+ [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
public async Task ScrollStateChanged_CHECK_EVENT()
{
var textEditor = new TextEditor()
textEditor.FontSizeScale = scale;
Assert.AreEqual(scale, textEditor.FontSizeScale, "Retrieved FontSizeScale should be equal to set value");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Test CursorPositionChanged.Check whether CursorPositionChanged defined in the spec is callable.")]
+ [Property("SPEC", "Tizen.NUI.BaseComponents.TextEditor.CursorPositionChanged E")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "EVL")]
+ [Property("AUTHOR", "Abdullah Ghujeh, a.ghujeh@samsung.com")]
+ public async Task CursorPositionChanged_CHECK_EVENT()
+ {
+ var textEditor = new TextEditor();
+ textEditor.Text = "123456789";
+ Window.Instance.GetDefaultLayer().Add(textEditor);
+ bool flag = false;
+ EventHandler handler = (obj, e) =>
+ {
+ flag = true;
+ };
+
+ textEditor.CursorPositionChanged += handler;
+ textEditor.PrimaryCursorPosition = 4;
+ await Task.Delay(500);
+
+ Assert.IsTrue(flag, "CursorPositionChanged is not be called");
+
+ textEditor.CursorPositionChanged -= handler;
+ }
}
}
using System;
using Tizen.NUI;
using Tizen.NUI.BaseComponents;
+using System.Threading.Tasks;
using Tizen.NUI.Test;
namespace Tizen.NUI.Tests
Assert.IsInstanceOf<TextField>(textField, "Should be an instance of TextField type.");
textField.MatchSystemLanguageDirection = false;
- Assert.AreEqual(false, textField.MatchSystemLanguageDirection, "should be same");\r
-\r
+ Assert.AreEqual(false, textField.MatchSystemLanguageDirection, "should be same");
+
textField.MatchSystemLanguageDirection = true;
Assert.AreEqual(true, textField.MatchSystemLanguageDirection, "should be same");
}
textField.FontSizeScale = scale;
Assert.AreEqual(scale, textField.FontSizeScale, "Retrieved FontSizeScale should be equal to set value");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Test CursorPositionChanged.Check whether CursorPositionChanged defined in the spec is callable.")]
+ [Property("SPEC", "Tizen.NUI.BaseComponents.TextField.CursorPositionChanged E")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "EVL")]
+ [Property("AUTHOR", "Abdullah Ghujeh, a.ghujeh@samsung.com")]
+ public async Task CursorPositionChanged_CHECK_EVENT()
+ {
+ var textField = new TextField();
+ textField.Text = "123456789";
+ Window.Instance.GetDefaultLayer().Add(textField);
+ bool flag = false;
+ EventHandler handler = (obj, e) =>
+ {
+ flag = true;
+ };
+
+ textField.CursorPositionChanged += handler;
+ textField.PrimaryCursorPosition = 4;
+ await Task.Delay(500);
+
+ Assert.IsTrue(flag, "CursorPositionChanged is not be called");
+ textField.CursorPositionChanged -= handler;
+ }
}
}