[Description("Tizen.Sample.Button test")]
public class ButtonTests
{
- private static TestPage _testPage = TestPage.GetInstance();
- private static Button _button;
+ private TestPage _testPage = TestPage.GetInstance();
+ private Button _button;
[SetUp]
- public static void Init()
+ public void Init()
{
LogUtils.Write(LogUtils.INFO, LogUtils.TAG, "Preconditions for each TEST");
_button = new Button();
}
[TearDown]
- public static void Destroy()
+ public void Destroy()
{
LogUtils.Write(LogUtils.INFO, LogUtils.TAG, "Postconditions for each TEST");
_button = null;
}
- private static void CreateButton(string buttonText)
+ private void CreateButton(string buttonText)
{
LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "CreateButton");
_testPage.ExecuteTC(layout);
}
- private static void OnClick(object sender, EventArgs e)
+ private void OnClick(object sender, EventArgs e)
{
// If your test is fail, you should set Assert.True(false , "msg");
Assert.True(true);
[Step(1, "Click run TC")]
[Step(2, "Click button")]
[Postcondition(1, "NA")]
- public static async Task Clicked_CB()
+ public async Task Clicked_CB()
{
CreateButton("Click me!! Test: Handle event click button");
_button.Clicked += OnClick;
await ManualTest.WaitForConfirm();
}
- private static void CreateButtonPage(string buttonText)
+ private void CreateButtonPage(string buttonText)
{
LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Init");
});
}
- public static void OnPressed(object sender, EventArgs e)
+ public void OnPressed(object sender, EventArgs e)
{
// pop layout
_testPage.getNavigationPage().PopAsync();
[Step(1, "Click run TC")]
[Step(2, "Click button after new page shown")]
[Postcondition(1, "NA")]
- public static async Task Pressed_CB()
+ public async Task Pressed_CB()
{
CreateButtonPage("Click me!! Test: Handle event press button");
_button.Clicked += OnPressed;
[TestFixture]
[Description("Tizen::Log Tests")]
public class LogTests {
-
- private static string TAG = "TCT";
- private static string _message;
+
+ private string TAG = "TCT";
+ private string _message;
[SetUp]
- public static void Init()
+ public void Init()
{
}
[TearDown]
- public static void Destroy()
+ public void Destroy()
{
}
[Step(1, "Click run TC")]
[Step(2, "check if log show \"Debug log message\" with Tag \"TCT\" and type log \"D\".")]
[Postcondition(1, "Close the terminal")]
- public static async Task Debug_PRINT_TO_DLOG() {
+ public async Task Debug_PRINT_TO_DLOG() {
/*
* TEST CODE - MANUAL TEST
* use command: "sdb dlog | grep TCT" to see log.
_message = "Debug log message";
Log.Debug(TAG, _message);
- /*
+ /*
* RESULT : PASS
* log show "Debug log message" with Tag "TCT" and type log "D"
*/
[Step(1, "Click run TC")]
[Step(2, "Check if log show \"Error log message\" with Tag \"TCT\" and type log \"E\".")]
[Postcondition(1, "Close the terminal")]
- public static async Task Error_PRINT_TO_DLOG() {
- /*
+ public async Task Error_PRINT_TO_DLOG() {
+ /*
* TEST CODE - MANUAL TEST
* use command: "sdb dlog | grep TCT" to see log.
*/
_message = "Error log message";
Log.Error(TAG, _message);
- /*
+ /*
* RESULT : PASS
* log show "Error log message" with Tag "TCT" and type log "E"
*/
[Step(1, "Click run TC")]
[Step(2, "Check if log show \"Fatal log message\" with Tag \"TCT\" and type log \"F\".")]
[Postcondition(1, "Close the terminal")]
- public static async Task Fatal_PRINT_TO_DLOG() {
- /*
+ public async Task Fatal_PRINT_TO_DLOG() {
+ /*
* TEST CODE - MANUAL TEST
* use command: "sdb dlog | grep TCT" to see log.
*/
_message = "Fatal log message";
Log.Fatal(TAG, _message);
- /*
+ /*
* RESULT : PASS
* log show "Fatal log message" with Tag "TCT" and type log "F"
*/
[Step(1, "Click run TC")]
[Step(2, "Check if log show \"Info log message\" with Tag \"TCT\" and type log \"I\".")]
[Postcondition(1, "Close the terminal")]
- public static async Task Info_PRINT_TO_DLOG() {
- /*
+ public async Task Info_PRINT_TO_DLOG() {
+ /*
* TEST CODE - MANUAL TEST
* use command: "sdb dlog | grep TCT" to see log.
*/
_message = "Info log message";
Log.Info(TAG, _message);
- /*
+ /*
* RESULT : PASS
* log show "Info log message" with Tag "TCT" and type log "I"
*/
[Step(1, "Click run TC")]
[Step(2, "Check if log show \"Verbose log message\" with Tag \"TCT\" and type log \"V\".")]
[Postcondition(1, "Close the terminal")]
- public static async Task Verbose_PRINT_TO_DLOG() {
- /*
+ public async Task Verbose_PRINT_TO_DLOG() {
+ /*
* TEST CODE - MANUAL TEST
* use command: "sdb dlog TCT" to see log.
*/
_message = "Verbose log message";
Log.Verbose(TAG, _message);
- /*
+ /*
* RESULT : PASS
* log not show "Verbose log message"
*/
[Step(1, "Click run TC")]
[Step(2, "Check if log show \"Warn log message\" with Tag \"TCT\" and type log \"W\".")]
[Postcondition(1, "Close the terminal")]
- public static async Task Warn_PRINT_TO_DLOG() {
- /*
+ public async Task Warn_PRINT_TO_DLOG() {
+ /*
* TEST CODE - MANUAL TEST
* use command: "sdb dlog | grep TCT" to see log.
*/
_message = "Warn log message";
Log.Warn(TAG, _message);
- /*
+ /*
* RESULT : PASS
* log show "Warn log message" with Tag "TCT" and type log "W"
*/
[Description("Sample Class Tests")]
public class SampleTests {
- private static string _message = "raycad";
+ private string _message = "raycad";
[SetUp]
- public static void Init()
+ public void Init()
{
LogUtils.Write(LogUtils.DEBUG , LogUtils.TAG , "Preconditions for each TEST");
}
[TearDown]
- public static void Destroy()
+ public void Destroy()
{
LogUtils.Write(LogUtils.DEBUG , LogUtils.TAG , "Postconditions for each TEST");
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Nguyen Truong Duong, duong.nt1@samsung.com")]
- public static void Test1()
+ public void Test1()
{
var getValue = _message;
Assert.IsInstanceOf<string>(getValue, "Object should be string type.");