From 0a858c70128e361d8e3f6898884cadbc9513651d Mon Sep 17 00:00:00 2001 From: Jeonghyun Yun Date: Wed, 24 Oct 2018 14:50:51 +0900 Subject: [PATCH] [ElmSharp][Non-ACR] Reinforce test coverage Change-Id: I946925e7e43365c06bf6a9d32977d09dbb20cca8 Signed-off-by: Jeonghyun Yun --- .../testcase/TSEntry.cs | 204 ++++++++++++++------- .../testcase/TSEvasImage.cs | 111 +++++++++-- .../testcase/TSGenItem.cs | 114 +++++++++++- .../testcase/TSImage.cs | 197 +++++++++++++++++++- .../Tizen.ElmSharp.Tests/testcase/TSButton.cs | 19 ++ .../Tizen.ElmSharp.Tests/testcase/TSEntry.cs | 20 ++ .../Tizen.ElmSharp.Tests/testcase/TSEvasCanvas.cs | 127 +++++++++++++ .../Tizen.ElmSharp.Tests/testcase/TSEvasObject.cs | 19 ++ .../Tizen.ElmSharp.Tests/testcase/TSGenList.cs | 38 ++++ .../Tizen.ElmSharp.Tests/testcase/TSLayout.cs | 80 +++++++- .../Tizen.ElmSharp.Tests/testcase/TSPoint.cs | 16 ++ .../Tizen.ElmSharp.Tests/testcase/TSPoint3D.cs | 16 ++ .../Tizen.ElmSharp.Tests/testcase/TSProgressBar.cs | 20 ++ .../Tizen.ElmSharp.Tests/testcase/TSRect.cs | 16 ++ .../Tizen.ElmSharp.Tests/testcase/TSSize.cs | 16 ++ .../Tizen.ElmSharp.Tests/testcase/TSWindow.cs | 14 ++ 16 files changed, 915 insertions(+), 112 deletions(-) create mode 100755 tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSEvasCanvas.cs diff --git a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSEntry.cs b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSEntry.cs index db3fd47..968c87c 100644 --- a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSEntry.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSEntry.cs @@ -440,7 +440,7 @@ namespace ElmSharp.Tests [Step(2, "Tap Entry.")] [Step(3, "Press return button of inputPanel.")] [Postcondition(1, "NA")] - public static async Task Activated_EVENT() + public async Task Activated_EVENT() { CreateEntry(); _entry.IsSingleLine = true; @@ -461,7 +461,7 @@ namespace ElmSharp.Tests [Step(1, "Click Run TC")] [Step(2, "Click Entry.")] [Postcondition(1, "NA")] - public static async Task Clicked_EVENT() + public async Task Clicked_EVENT() { CreateEntry(); _entry.Clicked += Confirm; @@ -481,7 +481,7 @@ namespace ElmSharp.Tests [Step(1, "Click Run TC")] [Step(2, "Input Entry.")] [Postcondition(1, "NA")] - public static async Task CursorChanged_EVENT() + public async Task CursorChanged_EVENT() { CreateEntry(); _entry.CursorChanged += Confirm; @@ -501,7 +501,7 @@ namespace ElmSharp.Tests [Step(1, "Click Run TC")] [Step(2, "Input Entry.")] [Postcondition(1, "NA")] - public static async Task ChangedByUser_EVENT() + public async Task ChangedByUser_EVENT() { CreateEntry(); _entry.ChangedByUser += Confirm; @@ -513,9 +513,9 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Test: Handle event SelectAll.")] - [Property("SPEC", "ElmSharp.Entry.SelectAll M")] + [Property("SPEC", "ElmSharp.Entry.SelectAll U")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] + [Property("CRITERIA", "UIBH")] [Property("AUTHOR", "Yan Zhao, yan97.zhao@samsung.com")] [Precondition(1, "NA")] [Step(1, "Click Run TC")] @@ -523,7 +523,7 @@ namespace ElmSharp.Tests [Step(3, "if All is Selected,press 'pass' button")] [Step(4, "Otherwise,press 'fail' button")] [Postcondition(1, "NA")] - public static async Task SelectAll_METHOD() + public async Task SelectAll_UIBH() { CreateEntryPage("SelectAll"); _entry.Text = "Entry test"; @@ -536,9 +536,9 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Test: Handle event SelectNone.")] - [Property("SPEC", "ElmSharp.Entry.SelectNone M")] + [Property("SPEC", "ElmSharp.Entry.SelectNone U")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] + [Property("CRITERIA", "UIBH")] [Property("AUTHOR", "Yan Zhao, yan97.zhao@samsung.com")] [Precondition(1, "NA")] [Step(1, "Click Run TC")] @@ -548,7 +548,7 @@ namespace ElmSharp.Tests [Step(5, "if None is Selected,press 'pass' button")] [Step(6, "Otherwise,press 'fail' button")] [Postcondition(1, "NA")] - public static async Task SelectNone_METHOD() + public async Task SelectNone_UIBH() { CreateEntryPage2("SelectAll", "SelectNone"); _entry.Text = "Entry test"; @@ -563,17 +563,17 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Test the inputPanel is not show.")] - [Property("SPEC", "ElmSharp.Entry.SetInputPanelEnabled M")] + [Property("SPEC", "ElmSharp.Entry.SetInputPanelEnabled U")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] + [Property("CRITERIA", "UILK")] [Property("AUTHOR", "Yan Zhao, yan97.zhao@samsung.com")] [Precondition(1, "NA")] [Step(1, "Click Run TC")] [Step(2, "Click Entry.")] [Step(3, "if InputPanel no show,press 'pass' button")] - [Step(5, "Otherwise,press 'fail' button")] + [Step(4, "Otherwise,press 'fail' button")] [Postcondition(1, "NA")] - public static async Task SetInputPanelEnabled_METHOD() + public async Task SetInputPanelEnabled_UILK() { CreateEntry(); _entry.SetInputPanelEnabled(false); @@ -584,9 +584,9 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Test InputPanelLayout type.")] - [Property("SPEC", "ElmSharp.Entry.SetInputPanelLayout M")] + [Property("SPEC", "ElmSharp.Entry.SetInputPanelLayout U")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] + [Property("CRITERIA", "UILK")] [Property("AUTHOR", "Yan Zhao, yan97.zhao@samsung.com")] [Precondition(1, "NA")] [Step(1, "Click Run TC")] @@ -595,7 +595,7 @@ namespace ElmSharp.Tests [Step(4, "if it is,press 'pass' button")] [Step(5, "Otherwise,press 'fail' button")] [Postcondition(1, "NA")] - public static async Task SetInputPanelLayout_METHOD() + public async Task SetInputPanelLayout_UILK() { CreateEntry(); _entry.SetInputPanelLayout(InputPanelLayout.NumberOnly); @@ -606,9 +606,9 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Test InputPanel returnKey type.")] - [Property("SPEC", "ElmSharp.Entry.SetInputPanelReturnKeyType M")] + [Property("SPEC", "ElmSharp.Entry.SetInputPanelReturnKeyType U")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] + [Property("CRITERIA", "UILK")] [Property("AUTHOR", "Yan Zhao, yan97.zhao@samsung.com")] [Precondition(1, "NA")] [Step(1, "Click Run TC")] @@ -617,7 +617,7 @@ namespace ElmSharp.Tests [Step(4, "if it is,press 'pass' button")] [Step(5, "Otherwise,press 'fail' button")] [Postcondition(1, "NA")] - public static async Task SetInputPanelReturnKeyType_METHOD() + public async Task SetInputPanelReturnKeyType_UILK() { CreateEntry(); _entry.SetInputPanelReturnKeyType(InputPanelReturnKeyType.Done); @@ -628,7 +628,7 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Test whether filter work when calling AppendMarkUpFilter(Func).")] - [Property("SPEC", "ElmSharp.Entry.AppendMarkUpFilter M")] + [Property("SPEC", "ElmSharp.Entry.AppendMarkUpFilter U")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "UIBH")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] @@ -639,7 +639,7 @@ namespace ElmSharp.Tests [Step(4, "Input 'a', and it will show 'a'.")] [Step(5, "if it is, click Pass, or Fail.")] [Postcondition(1, "NA")] - public static async Task AppendMarkUpFilter_METHOD() + public async Task AppendMarkUpFilter_UIBH() { CreateEntry(); _entry.Text = "Plz input: "; @@ -651,8 +651,32 @@ namespace ElmSharp.Tests [Test] [Category("P1")] + [Description("Test whether filter work when calling PrependMarkUpFilter(Func).")] + [Property("SPEC", "ElmSharp.Entry.PrependMarkUpFilter U")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "UIBH")] + [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")] + [Precondition(1, "NA")] + [Step(1, "Turn smart input off(Setting->Input->Keyboard->Smart Input)")] + [Step(2, "Click Run TC.")] + [Step(3, "Input 't', and it will show 'Tizen'.")] + [Step(4, "Input 'a', and it will show 'a'.")] + [Step(5, "if it is, click Pass, or Fail.")] + [Postcondition(1, "NA")] + public async Task PrependMarkUpFilter_UIBH() + { + CreateEntry(); + _entry.Text = "Plz input: "; + _entry.PrependMarkUpFilter(SetFilter); + // Waits for user confirmation. + await ManualTest.WaitForConfirm(); + _entry.RemoveMarkUpFilter(SetFilter); + } + + [Test] + [Category("P1")] [Description("Test whether filter is removed when calling RemoveMarkUpFilter(Func).")] - [Property("SPEC", "ElmSharp.Entry.RemoveMarkUpFilter M")] + [Property("SPEC", "ElmSharp.Entry.RemoveMarkUpFilter U")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "UIBH")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] @@ -664,7 +688,7 @@ namespace ElmSharp.Tests [Step(5, "Click RemoveMarkUpFilter button, and input 't', and it will show 't'.")] [Step(6, "if it is, click Pass, or Fail.")] [Postcondition(1, "NA")] - public static async Task RemoveMarkUpFilter_METHOD() + public async Task RemoveMarkUpFilter_UIBH() { CreateEntryPage("RemoveMarkUpFilter"); _entry.Text = "Plz input: "; @@ -681,16 +705,16 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Test whether append text after calling AppendText(string).")] - [Property("SPEC", "ElmSharp.Entry.AppendText M")] + [Property("SPEC", "ElmSharp.Entry.AppendText U")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "UIBH")] + [Property("CRITERIA", "UILK")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] [Precondition(1, "NA")] [Step(1, "Click Run TC.")] [Step(2, "Click AppendText button, and you will see '456' after '123' on the entry.")] [Step(3, "If it is, click Pass, or Fail.")] [Postcondition(1, "NA")] - public static async Task AppendText_METHOD() + public async Task AppendText_UILK() { CreateEntryPage("AppendText"); _entry.Text = "123"; @@ -706,14 +730,14 @@ namespace ElmSharp.Tests [Description("Test whether the cursor on the begin of the entry after calling BeginCursorSelection().")] [Property("SPEC", "ElmSharp.Entry.BeginCursorSelection M")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "UIBH")] + [Property("CRITERIA", "MR")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] [Precondition(1, "NA")] [Step(1, "Click Run TC.")] [Step(2, "Click BeginCursorSelection button.")] [Step(3, "Test case result will be shown automatically.")] [Postcondition(1, "NA")] - public static async Task BeginCursorSelection_METHOD() + public async Task BeginCursorSelection_METHOD() { CreateEntryPage("BeginCursorSelection"); _entry.Text = "123456"; @@ -729,14 +753,14 @@ namespace ElmSharp.Tests [Description("Test whether the cursor on the end of the entry after calling EndCursorSelection().")] [Property("SPEC", "ElmSharp.Entry.EndCursorSelection M")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "UIBH")] + [Property("CRITERIA", "MR")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] [Precondition(1, "NA")] [Step(1, "Click Run TC.")] [Step(2, "Click EndCursorSelection button.")] [Step(3, "Test case result will be shown automatically.")] [Postcondition(1, "NA")] - public static async Task EndCursorSelection_METHOD() + public async Task EndCursorSelection_METHOD() { CreateEntryPage("EndCursorSelection"); _entry.Text = "123456"; @@ -750,7 +774,7 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Test whether copied to clipboard after calling CopySelection().")] - [Property("SPEC", "ElmSharp.Entry.CopySelection M")] + [Property("SPEC", "ElmSharp.Entry.CopySelection U")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "UIBH")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] @@ -759,7 +783,7 @@ namespace ElmSharp.Tests [Step(2, "Click CopySelection button, and you will see that the text is selected and a popup which shows 'Item already copied to clipboard'.")] [Step(3, "If it is, click Pass, or Fail.")] [Postcondition(1, "NA")] - public static async Task CopySelection_METHOD() + public async Task CopySelection_UIBH() { if (ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.MobileProfile) != 0) { @@ -781,7 +805,7 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Test whether cutted to clipboard after calling CutSelection().")] - [Property("SPEC", "ElmSharp.Entry.CutSelection M")] + [Property("SPEC", "ElmSharp.Entry.CutSelection U")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "UIBH")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] @@ -790,7 +814,7 @@ namespace ElmSharp.Tests [Step(2, "Click CutSelection button, and you will see that the text is cutted and a popup which shows 'Item already copied to clipboard'.")] [Step(3, "If it is, click Pass, or Fail.")] [Postcondition(1, "NA")] - public static async Task CutSelection_METHOD() + public async Task CutSelection_UIBH() { if (ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.MobileProfile) != 0) { @@ -812,16 +836,16 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Test whether paste the text successful after calling PasteSelection().")] - [Property("SPEC", "ElmSharp.Entry.PasteSelection M")] + [Property("SPEC", "ElmSharp.Entry.PasteSelection U")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "UIBH")] + [Property("CRITERIA", "UILK")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] [Precondition(1, "NA")] [Step(1, "Click Run TC.")] [Step(2, "Click PasteSelection button, and you will see '123456' again.")] [Step(3, "If it is, click Pass, or Fail.")] [Postcondition(1, "NA")] - public static async Task PasteSelection_METHOD() + public async Task PasteSelection_UILK() { if (ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.MobileProfile) != 0) { @@ -846,7 +870,7 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Test whether select text successful after calling DisableSelection(bool).")] - [Property("SPEC", "ElmSharp.Entry.DisableSelection M")] + [Property("SPEC", "ElmSharp.Entry.DisableSelection U")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "UIBH")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] @@ -856,7 +880,7 @@ namespace ElmSharp.Tests [Step(3, "Please, check the both ends of the selected sentence")] [Step(4, "Pass if there is no marks(handlers) at both ends of the selected sentence")] [Postcondition(1, "NA")] - public static async Task DisableSelection_METHOD() + public async Task DisableSelection_UIBH() { if (ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.MobileProfile) != 0) { @@ -882,14 +906,14 @@ namespace ElmSharp.Tests [Description("Test whether show the string by the cursor at its current position after calling GetCursorContent().")] [Property("SPEC", "ElmSharp.Entry.GetCursorContent M")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "UIBH")] + [Property("CRITERIA", "MR")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] [Precondition(1, "NA")] [Step(1, "Click Run TC.")] [Step(2, "Put the cursor between d and e.")] [Step(3, "Test case result will be shown automatically.")] [Postcondition(1, "NA")] - public static async Task GetCursorContent_METHOD() + public async Task GetCursorContent_METHOD() { CreateEntry(); _entry.Text = "123456 abcdef"; @@ -905,14 +929,14 @@ namespace ElmSharp.Tests [Description("Test whether show the text on the label after calling GetCursorContent().")] [Property("SPEC", "ElmSharp.Entry.GetSelection M")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "UIBH")] + [Property("CRITERIA", "MR")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] [Precondition(1, "NA")] [Step(1, "Click Run TC.")] [Step(2, "Click GetSelection button.")] [Step(3, "Test case result will be shown automatically.")] [Postcondition(1, "NA")] - public static async Task GetSelection_METHOD() + public async Task GetSelection_METHOD() { CreateEntryPage("GetSelection"); _entry.Text = "123456 abcdef"; @@ -926,16 +950,16 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Test whether hidding the input panel after calling HideInputPanel().")] - [Property("SPEC", "ElmSharp.Entry.HideInputPanel M")] + [Property("SPEC", "ElmSharp.Entry.HideInputPanel U")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "UIBH")] + [Property("CRITERIA", "UILK")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] [Precondition(1, "NA")] [Step(1, "Click Run TC.")] [Step(2, "Click HideInputPanel button, and you will see that the input panel is hidden.")] [Step(3, "If it is, click Pass, or Fail.")] [Postcondition(1, "NA")] - public static async Task HideInputPanel_METHOD() + public async Task HideInputPanel_UILK() { CreateEntryPage("HideInputPanel"); _entry.Text = "123456 abcdef"; @@ -950,16 +974,16 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Test whether showing the input panel after calling ShowInputPanel().")] - [Property("SPEC", "ElmSharp.Entry.ShowInputPanel M")] + [Property("SPEC", "ElmSharp.Entry.ShowInputPanel U")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "UIBH")] + [Property("CRITERIA", "UILK")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] [Precondition(1, "NA")] [Step(1, "Click Run TC.")] [Step(2, "Click ShowInputPanel button, and you will see that the input panel is shown.")] [Step(3, "If it is, click Pass, or Fail.")] [Postcondition(1, "NA")] - public static async Task ShowInputPanel_METHOD() + public async Task ShowInputPanel_UILK() { CreateEntryPage("ShowInputPanel"); _entry.Text = "123456 abcdef"; @@ -973,16 +997,16 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Test whether insert text successful after calling InsertTextToCursor().")] - [Property("SPEC", "ElmSharp.Entry.InsertTextToCursor M")] + [Property("SPEC", "ElmSharp.Entry.InsertTextToCursor U")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "UIBH")] + [Property("CRITERIA", "UILK")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] [Precondition(1, "NA")] [Step(1, "Click Run TC.")] [Step(2, "Click InsertTextToCursor button, and you will see 'InsertText' after '123456'.")] [Step(3, "If it is, click Pass, or Fail.")] [Postcondition(1, "NA")] - public static async Task InsertTextToCursor_METHOD() + public async Task InsertTextToCursor_UILK() { CreateEntryPage("InsertTextToCursor"); _entry.Text = "123456 abcdef"; @@ -999,7 +1023,7 @@ namespace ElmSharp.Tests [Description("Test whether set file successful after calling SetFile(string, ElmSharp.TextFormat).")] [Property("SPEC", "ElmSharp.Entry.SetFile M")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "UIBH")] + [Property("CRITERIA", "MR")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] [Precondition(1, "NA")] [Step(1, "Click Run TC.")] @@ -1007,7 +1031,7 @@ namespace ElmSharp.Tests [Step(3, "Click ExistsFile? button.")] [Step(4, "Test case result will be shown automatically.")] [Postcondition(1, "NA")] - public static async Task SetFile_METHOD() + public async Task SetFile_METHOD() { CreateEntryPage("ExistsFile?"); _entry.IsAutoSave = true; @@ -1025,14 +1049,14 @@ namespace ElmSharp.Tests [Description("Test whether save file successful after calling SaveFile().")] [Property("SPEC", "ElmSharp.Entry.SaveFile M")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "UIBH")] + [Property("CRITERIA", "MR")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] [Precondition(1, "NA")] [Step(1, "Click Run TC.")] [Step(2, "Click SaveFile button.")] [Step(3, "Test case result will be shown automatically.")] [Postcondition(1, "NA")] - public static async Task SaveFile_METHOD() + public async Task SaveFile_METHOD() { CreateEntryPage("SaveFile"); _entry.IsAutoSave = false; @@ -1048,15 +1072,15 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Test whether showing an icon successful after calling SetIconVisible(bool).")] - [Property("SPEC", "ElmSharp.Entry.SetIconVisible M")] + [Property("SPEC", "ElmSharp.Entry.SetIconVisible U")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "UIBH")] + [Property("CRITERIA", "UILK")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] [Precondition(1, "NA")] [Step(1, "Click Run TC.")] [Step(2, "Click Pass if you can see an icon on the left-side, or click Fail.")] [Postcondition(1, "NA")] - public static async Task SetIconVisible_METHOD() + public async Task SetIconVisible_UILK() { CreateEntry(); @@ -1083,7 +1107,7 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Test whether the return key on the input panel is disabled automatically when entry has no text.")] - [Property("SPEC", "ElmSharp.Entry.SetInputPanelReturnKeyAutoEnable M")] + [Property("SPEC", "ElmSharp.Entry.SetInputPanelReturnKeyAutoEnable U")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "UIBH")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] @@ -1093,7 +1117,7 @@ namespace ElmSharp.Tests [Step(3, "Input 'abc'. The return key is enabled when the entry has text.")] [Step(4, "If it is, click Pass, or click Fail.")] [Postcondition(1, "NA")] - public static async Task SetInputPanelReturnKeyAutoEnable_METHOD() + public async Task SetInputPanelReturnKeyAutoEnable_UIBH() { CreateEntry(); _entry.Text = ""; @@ -1107,7 +1131,7 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Test whether '123456' is selected after calling SetSelectionRegion(int, int).")] - [Property("SPEC", "ElmSharp.Entry.SetSelectionRegion M")] + [Property("SPEC", "ElmSharp.Entry.SetSelectionRegion U")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "UIBH")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] @@ -1115,7 +1139,7 @@ namespace ElmSharp.Tests [Step(1, "Click Run TC.")] [Step(2, "Click Pass if you can see '123456' is selected, or click Fail.")] [Postcondition(1, "NA")] - public static async Task SetSelectionRegion_METHOD() + public async Task SetSelectionRegion_UIBH() { CreateEntry(); _entry.Text = "123456 abcdef"; @@ -1128,22 +1152,64 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Test whether calling bind ItemProvider function successfully.")] - [Property("SPEC", "ElmSharp.Entry.AppendItemProvider M")] + [Property("SPEC", "ElmSharp.Entry.AppendItemProvider U")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] + [Property("CRITERIA", "UILK")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] [Precondition(1, "NA")] [Step(1, "Click Run TC")] [Step(2, "An image will be shown on the entry.")] - [Step(4, "if it is, click Pass, or Fail.")] + [Step(3, "if it is, click Pass, or Fail.")] + [Postcondition(1, "NA")] + public async Task AppendItemProvider_UILK() + { + CreateEntry(); + _entry.AppendItemProvider(ItemProvider); + _entry.Text = ""; + // Waits for user confirmation. + await ManualTest.WaitForConfirm(); + } + + [Test] + [Category("P1")] + [Description("Test whether calling bind ItemProvider function successfully.")] + [Property("SPEC", "ElmSharp.Entry.PrependItemProvider U")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "UILK")] + [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")] + [Precondition(1, "NA")] + [Step(1, "Click Run TC")] + [Step(2, "An image will be shown on the entry.")] + [Step(3, "if it is, click Pass, or Fail.")] + [Postcondition(1, "NA")] + public async Task PrependItemProvider_UILK() + { + CreateEntry(); + _entry.PrependItemProvider(ItemProvider); + _entry.Text = ""; + // Waits for user confirmation. + await ManualTest.WaitForConfirm(); + } + + [Test] + [Category("P1")] + [Description("Test whether calling RemoveItemProvider successfully.")] + [Property("SPEC", "ElmSharp.Entry.RemoveItemProvider U")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "UILK")] + [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")] + [Precondition(1, "NA")] + [Step(1, "Click Run TC")] + [Step(2, "Click Pass if the image on the entry is not flower image, or click Fail.")] [Postcondition(1, "NA")] - public static async Task AppendItemProvider_METHOD() + public async Task RemoveItemProvider_UILK() { CreateEntry(); _entry.AppendItemProvider(ItemProvider); _entry.Text = ""; + _entry.RemoveItemProvider(ItemProvider); // Waits for user confirmation. await ManualTest.WaitForConfirm(); } } -} \ No newline at end of file +} diff --git a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSEvasImage.cs b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSEvasImage.cs index efd1b1b..ccdb181 100755 --- a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSEvasImage.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSEvasImage.cs @@ -30,6 +30,7 @@ namespace ElmSharp.Tests { private static TestPage _testPage = TestPage.GetInstance(); private static Box _box; + private static Button _button; private static EvasImage _evasImage1; private static EvasImage _evasImage2; private static EvasImage _evasImage3; @@ -52,6 +53,11 @@ namespace ElmSharp.Tests _box.Unrealize(); _box = null; } + if (_button != null) + { + _button.Unrealize(); + _button = null; + } if (_evasImage1 != null) { _evasImage1.Unrealize(); @@ -127,10 +133,29 @@ namespace ElmSharp.Tests _evasImage2.IsSourceVisible = false; } + private static void OnClickedBySaveFile(object sender, EventArgs e) + { + _evasImage1.Save(@"/tmp/testfile.png", null, "quality=100 compress=0"); + + if (File.Exists(@"/tmp/testfile.png")) + { + ManualTest.Confirm(); + + FileInfo file = new FileInfo(@"/tmp/testfile.png"); + file.Delete(); + } + + if (!ManualTest.IsConfirmed()) + { + TSettings.GetInstance().TCResult = StrResult.FAIL; + ManualTest.Confirm(); + } + } + [Test] [Category("P1")] [Description("Check whether calling SetBorder can show normal.")] - [Property("SPEC", "ElmSharp.EvasImage.SetBorder M")] + [Property("SPEC", "ElmSharp.EvasImage.SetBorder U")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "UILK")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] @@ -138,7 +163,7 @@ namespace ElmSharp.Tests [Step(1, "Click run TC")] [Step(2, "Plz click Pass if you can see a border with image.")] [Postcondition(1, "NA")] - public static async Task SetBorder_Check() + public async Task SetBorder_UILK() { _evasImage1 = CreateEvasImage(); _evasImage1.IsFilled = true; @@ -153,7 +178,7 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Check whether calling SetFile can show normal.")] - [Property("SPEC", "ElmSharp.EvasImage.SetFile M")] + [Property("SPEC", "ElmSharp.EvasImage.SetFile U")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "UILK")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] @@ -161,7 +186,7 @@ namespace ElmSharp.Tests [Step(1, "Click run TC")] [Step(2, "Plz click Pass if you can see a flower image.")] [Postcondition(1, "NA")] - public static async Task SetFile_Check() + public async Task SetFile_UILK() { _evasImage1 = CreateEvasImage(); _evasImage1.IsFilled = true; @@ -174,7 +199,7 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Check whether calling SetFill can show normal.")] - [Property("SPEC", "ElmSharp.EvasImage.SetFill M")] + [Property("SPEC", "ElmSharp.EvasImage.SetFill U")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "UILK")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] @@ -182,7 +207,7 @@ namespace ElmSharp.Tests [Step(1, "Click run TC")] [Step(2, "Plz click Pass if you can see 6 flower images on the bottom, or click Fail")] [Postcondition(1, "NA")] - public static async Task SetFill_Check() + public async Task SetFill_UILK() { _evasImage1 = CreateEvasImage(); @@ -208,7 +233,7 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Check whether calling SetSource can show normal.")] - [Property("SPEC", "ElmSharp.EvasImage.SetSource M")] + [Property("SPEC", "ElmSharp.EvasImage.SetSource U")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "UILK")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] @@ -216,7 +241,7 @@ namespace ElmSharp.Tests [Step(1, "Click run TC")] [Step(2, "Plz click Pass if you can see 2 flower images, or click Fail")] [Postcondition(1, "NA")] - public static async Task SetSource_Check() + public async Task SetSource_UILK() { _evasImage1 = CreateEvasImage(); @@ -241,7 +266,7 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Check whether calling SetStream can show normal.")] - [Property("SPEC", "ElmSharp.EvasImage.SetStream M")] + [Property("SPEC", "ElmSharp.EvasImage.SetStream U")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "UILK")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] @@ -249,7 +274,7 @@ namespace ElmSharp.Tests [Step(1, "Click run TC")] [Step(2, "Plz click Pass if you can see 1 flower images, or click Fail.")] [Postcondition(1, "NA")] - public static async Task SetStream_Check() + public async Task SetStream_UILK() { _evasImage1 = CreateEvasImage(); @@ -265,7 +290,7 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Check whether calling BorderCenterFillMode can show normal.")] - [Property("SPEC", "ElmSharp.EvasImage.BorderCenterFillMode A")] + [Property("SPEC", "ElmSharp.EvasImage.BorderCenterFillMode U")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "UILK")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] @@ -273,7 +298,7 @@ namespace ElmSharp.Tests [Step(1, "Click run TC")] [Step(2, "Plz click Pass is you can see the second image only shows its border and the other images show all, or click Fail.")] [Postcondition(1, "NA")] - public static async Task BorderCenterFillMode_Check() + public async Task BorderCenterFillMode_UILK() { _evasImage1 = CreateEvasImage(); _evasImage1.Show(); @@ -316,7 +341,7 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Check whether calling File can show normal.")] - [Property("SPEC", "ElmSharp.EvasImage.File A")] + [Property("SPEC", "ElmSharp.EvasImage.File U")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "UILK")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] @@ -324,7 +349,7 @@ namespace ElmSharp.Tests [Step(1, "Click run TC")] [Step(2, "Plz click Pass if you can see 1 flower images, or click Fail.")] [Postcondition(1, "NA")] - public static async Task File_Check() + public async Task File_UILK() { _evasImage1 = CreateEvasImage(); _evasImage1.IsFilled = true; @@ -337,8 +362,54 @@ namespace ElmSharp.Tests [Test] [Category("P1")] + [Description("Test: Check whether image file save successful after calling Save().")] + [Property("SPEC", "ElmSharp.EvasImage.Save M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")] + [Precondition(1, "NA")] + [Step(1, "Click Run TC.")] + [Step(2, "Click Save button.")] + [Step(3, "Test case result will be shown automatically.")] + [Postcondition(1, "NA")] + public async Task Save_METHOD() + { + _box = CreateBox(); + _box.Show(); + + _evasImage1 = CreateEvasImage(); + _evasImage1.IsFilled = true; + _evasImage1.SetFile(Path.Combine(Program.ResourceDir, "test.jpg"), null); + _evasImage1.Show(); + _box.PackEnd(_evasImage1); + + _button = new Button(_window) + { + Text = "Save", + AlignmentX = -1, + AlignmentY = -1, + MinimumWidth = 100, + MinimumHeight = 80, + }; + _button.Show(); + _box.PackEnd(_button); + + _testPage.ExecuteTCByPage(_box); + + _button.Clicked += OnClickedBySaveFile; + // Waits for user confirmation. + await ManualTest.WaitForConfirm(); + _button.Clicked -= OnClickedBySaveFile; + + var niviframe = _testPage.getNavigationPage(); + if (niviframe != null) + niviframe.Pop(); + } + + [Test] + [Category("P1")] [Description("Check whether calling IsFilled can show normal.")] - [Property("SPEC", "ElmSharp.EvasImage.IsFilled A")] + [Property("SPEC", "ElmSharp.EvasImage.IsFilled U")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "UILK")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] @@ -346,7 +417,7 @@ namespace ElmSharp.Tests [Step(1, "Click run TC")] [Step(2, "Plz click Pass if you can see 1 flower images, or click Fail.")] [Postcondition(1, "NA")] - public static async Task IsFilled_Check() + public async Task IsFilled_UILK() { EvasImage evasImage1 = new EvasImage(_window) { @@ -389,16 +460,16 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Check whether EvasImage can be shown if IsSourceVisible is true, and cannot be shown if IsSourceVisible is false.")] - [Property("SPEC", "ElmSharp.EvasImage.IsSourceVisible A")] + [Property("SPEC", "ElmSharp.EvasImage.IsSourceVisible U")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "UILK")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] [Precondition(1, "NA")] [Step(1, "Click run TC")] [Step(2, "Click 'Change Visible' button")] - [Step(2, "Plz click Pass if you can see only 1 tree, or click Fail.")] + [Step(3, "Plz click Pass if you can see only 1 tree, or click Fail.")] [Postcondition(1, "NA")] - public static async Task IsSourceVisible_Check() + public async Task IsSourceVisible_UILK() { _img1 = CreateImage("test.jpg"); _img1.Show(); @@ -450,4 +521,4 @@ namespace ElmSharp.Tests btn.Clicked -= OnClickedByVisible; } } -} \ No newline at end of file +} diff --git a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSGenItem.cs b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSGenItem.cs index 99ed313..5950978 100755 --- a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSGenItem.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSGenItem.cs @@ -17,6 +17,7 @@ using System; using System.Threading.Tasks; using NUnit.Framework; +using NUnit.Framework.TUnit; using ElmSharpApplication.Tizen; using System.Collections.Generic; @@ -226,10 +227,47 @@ namespace ElmSharp.Tests ManualTest.Confirm(); } + private void OnItemSelectedByCursor(object s, GenListItemEventArgs e) + { + _selectedItem = e.Item; + + if (_selectedItem.Cursor == "boat") + { + ManualTest.Confirm(); + } + else + { + if (!ManualTest.IsConfirmed()) + { + TSettings.GetInstance().TCResult = StrResult.FAIL; + ManualTest.Confirm(); + } + } + } + + private void OnItemSelectedByCursorStyle(object s, GenListItemEventArgs e) + { + _selectedItem = e.Item; + _selectedItem.CursorStyle = "transparent"; + + if (_selectedItem.CursorStyle == "transparent") + { + ManualTest.Confirm(); + } + else + { + if (!ManualTest.IsConfirmed()) + { + TSettings.GetInstance().TCResult = StrResult.FAIL; + ManualTest.Confirm(); + } + } + } + [Test] [Category("P1")] [Description("Check whether tooltip is shown after click grid item.")] - [Property("SPEC", "ElmSharp.GenItem.UpdateTooltipDelegate M")] + [Property("SPEC", "ElmSharp.GenItem.UpdateTooltipDelegate U")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "UIBH")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] @@ -238,7 +276,7 @@ namespace ElmSharp.Tests [Step(2, "Click any grid item.")] [Step(3, "Click Pass if you can see the item's tooltip which is a button, or click Fail.")] [Postcondition(1, "NA")] - public async Task UpdateTooltipDelegate_BEHAVIOR() + public async Task UpdateTooltipDelegate_UIBH() { if (ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.WearableProfile) == 0) { @@ -279,7 +317,7 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Check whether tooltip is shown after click list item.")] - [Property("SPEC", "ElmSharp.GenItem.TooltipContentDelegate A")] + [Property("SPEC", "ElmSharp.GenItem.TooltipContentDelegate U")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "UIBH")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] @@ -288,7 +326,7 @@ namespace ElmSharp.Tests [Step(2, "Click any list item.")] [Step(3, "Click Pass if you can see the item's tooltip which is a button, or click Fail.")] [Postcondition(1, "NA")] - public async Task TooltipContentDelegate_BEHAVIOR() + public async Task TooltipContentDelegate_UIBH() { if (ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.WearableProfile) == 0) { @@ -325,7 +363,7 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Check whether tooltip is shown after click grid item.")] - [Property("SPEC", "ElmSharp.GenItem.GetTooltipContentDelegate.GetTooltipContentDelegate M")] + [Property("SPEC", "ElmSharp.GenItem.GetTooltipContentDelegate.GetTooltipContentDelegate U")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "UIBH")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] @@ -334,7 +372,7 @@ namespace ElmSharp.Tests [Step(2, "Click any grid item.")] [Step(3, "Click Pass if you can see the item's tooltip which is a button, or click Fail.")] [Postcondition(1, "NA")] - public async Task GetTooltipContentDelegate_BEHAVIOR() + public async Task GetTooltipContentDelegate_UIBH() { if (ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.WearableProfile) == 0) { @@ -375,16 +413,16 @@ namespace ElmSharp.Tests [Test] [Category("P1")] [Description("Check whether calling OnInvalidate method successful after deleting item.")] - [Property("SPEC", "ElmSharp.GenItem.OnInvalidate M")] + [Property("SPEC", "ElmSharp.GenItem.OnInvalidate E")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "UIBH")] + [Property("CRITERIA", "EVL")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] [Precondition(1, "NA")] [Step(1, "Click Run tc.")] [Step(2, "Click any list item.")] [Step(3, "Testcase result will show automatically.")] [Postcondition(1, "NA")] - public async Task OnInvalidate_BEHAVIOR() + public async Task OnInvalidate_EVENT() { _defaultClass.DeleteHandler = DeleteHandlerDelegate; for (int i = 1; i <= 5; i++) @@ -399,5 +437,61 @@ namespace ElmSharp.Tests await ManualTest.WaitForConfirm(); _genList.ItemSelected -= OnItemSelected; } + + [Test] + [Category("P1")] + [Description("Check return data of Cursor is equal to set value.")] + [Property("SPEC", "ElmSharp.GenItem.Cursor A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")] + [Precondition(1, "NA")] + [Step(1, "Click Run tc.")] + [Step(2, "Click any list item.")] + [Step(3, "Testcase result will show automatically.")] + [Postcondition(1, "NA")] + public async Task Cursor_SET_GET() + { + for (int i = 1; i <= 5; i++) + { + GenItem item = _genList.Append(_defaultClass, "Item" + i, GenListItemType.Normal); + item.Cursor = "boat"; + } + _genList.Show(); + _genList.ItemSelected += OnItemSelectedByCursor; + + _testPage.ExecuteTC(_genList); + + await ManualTest.WaitForConfirm(); + _genList.ItemSelected -= OnItemSelectedByCursor; + } + + [Test] + [Category("P1")] + [Description("Check return data of CursorStyle is equal to set value.")] + [Property("SPEC", "ElmSharp.GenItem.CursorStyle A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")] + [Precondition(1, "NA")] + [Step(1, "Click Run tc.")] + [Step(2, "Click any list item.")] + [Step(3, "Testcase result will show automatically.")] + [Postcondition(1, "NA")] + public async Task CursorStyle_SET_GET() + { + for (int i = 1; i <= 5; i++) + { + GenItem item = _genList.Append(_defaultClass, "Item" + i, GenListItemType.Normal); + item.Cursor = "boat"; + } + _genList.Show(); + _genList.ItemSelected += OnItemSelectedByCursorStyle; + + _testPage.ExecuteTC(_genList); + + await ManualTest.WaitForConfirm(); + _genList.ItemSelected -= OnItemSelectedByCursorStyle; + } } -} \ No newline at end of file +} diff --git a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSImage.cs b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSImage.cs index 386f875..7d5a7ee 100644 --- a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSImage.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSImage.cs @@ -20,6 +20,7 @@ using System.Threading.Tasks; using NUnit.Framework; using NUnit.Framework.TUnit; using ElmSharpApplication.Tizen; +using System.Threading; namespace ElmSharp.Tests { @@ -79,7 +80,7 @@ namespace ElmSharp.Tests [Step(1, "Click run TC")] [Step(2, "Click image")] [Postcondition(1, "NA")] - public static async Task Clicked_Check() + public async Task Clicked_EVENT() { CreateImage(); _image.Clicked += OnClicked; @@ -92,18 +93,18 @@ namespace ElmSharp.Tests [Description("Test: Check wheter image loading is working or not asynchronously.")] [Property("SPEC", "ElmSharp.Image.LoadAsync M")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] + [Property("CRITERIA", "MR")] [Property("AUTHOR", "kangho.hur@samsung.com")] [Precondition(1, "Ensure network connectoin is available")] [Step(1, "Click run TC")] [Step(2, "Click 'File' Button")] [Step(3, "Click 'URI' Button")] [Step(4, "Wait for 5~10 seconds")] - [Step(6, "Click 'Stream' Button")] - [Step(7, "Click 'Invalid' Button")] - [Step(8, "Test results are automatically determined")] + [Step(5, "Click 'Stream' Button")] + [Step(6, "Click 'Invalid' Button")] + [Step(7, "Test results are automatically determined")] [Postcondition(1, "NA")] - public static async Task LoadAsync_Check() + public async Task LoadAsync_METHOD() { bool checkFile = false; bool checkUri = false; @@ -261,6 +262,12 @@ namespace ElmSharp.Tests //Clean up box.Unrealize(); box = null; + image.LoadingCompleted -= (s, e) => { }; + image.LoadingFailed -= (s, e) => { }; + btnFile.Clicked -= async (s, e) => { }; + btnUri.Clicked -= async (s, e) => { }; + btnStream.Clicked -= async (s, e) => { }; + btnInvalid.Clicked -= async (s, e) => { }; // Validation if (checkFile && checkUri && checkStream && !checkInvalid && checkLoadingCompleted && checkLoadingFailed) @@ -275,6 +282,170 @@ namespace ElmSharp.Tests [Test] [Category("P1")] + [Description("Test: Check wheter image loading is working or not asynchronously with cancellation token.")] + [Property("SPEC", "ElmSharp.Image.LoadAsync M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "kangho.hur@samsung.com")] + [Precondition(1, "Ensure network connectoin is available")] + [Step(1, "Click run TC")] + [Step(2, "Click 'File' Button")] + [Step(3, "Click 'URI' Button")] + [Step(4, "Wait for 5~10 seconds")] + [Step(5, "Click 'Stream' Button")] + [Step(6, "Test results are automatically determined")] + [Postcondition(1, "NA")] + public async Task LoadAsync2_METHOD() + { + bool checkFile = false; + bool checkUri = false; + bool checkStream = false; + bool checkLoadingCompleted = false; + + Box box = new Box(_window) + { + AlignmentX = -1, + AlignmentY = -1, + }; + box.Show(); + + Box buttonBox = new Box(_window) + { + IsHorizontal = true, + AlignmentX = -1, + AlignmentY = 0, + }; + buttonBox.Show(); + + Button btnFile = new Button(_window) + { + Text = "File", + AlignmentX = -1, + AlignmentY = -1, + WeightX = 1, + WeightY = 1 + }; + btnFile.Show(); + + Button btnUri = new Button(_window) + { + Text = "URI", + AlignmentX = -1, + AlignmentY = -1, + WeightX = 1, + WeightY = 1 + }; + btnUri.Show(); + + Button btnStream = new Button(_window) + { + Text = "Stream", + AlignmentX = -1, + AlignmentY = -1, + WeightX = 1, + WeightY = 1 + }; + btnStream.Show(); + + Label info = new Label(_window) + { + Color = Color.White, + AlignmentX = -1, + AlignmentY = 0, + WeightX = 1 + }; + info.Show(); + + Image image = new Image(_window) + { + IsFixedAspect = true, + AlignmentX = -1, + AlignmentY = -1, + WeightX = 1, + WeightY = 1 + }; + image.Show(); + + image.LoadingCompleted += (s, e) => + { + checkLoadingCompleted = true; + info.Text = "Image has been loaded successfully."; + }; + + buttonBox.PackEnd(btnFile); + buttonBox.PackEnd(btnUri); + buttonBox.PackEnd(btnStream); + + if (ElmSharpProfile.GetProfile() != ElmSharpProfile.WearableProfile) + { + buttonBox.PackEnd(image); + box.PackEnd(buttonBox); + box.PackEnd(info); + } + else + { + box.PackEnd(image); + Scroller scroller = new Scroller(_window) + { + AlignmentX = -1, + AlignmentY = -1, + WeightX = 1, + WeightY = 1, + }; + scroller.Show(); + scroller.SetContent(buttonBox); + box.PackEnd(scroller); + box.PackEnd(info); + } + + box.PackEnd(buttonBox); + box.PackEnd(info); + + btnFile.Clicked += async (s, e) => + { + info.Text = ""; + checkFile = await image.LoadAsync(Program.Current.DirectoryInfo.Resource + "test.jpg", default(CancellationToken)); + }; + + btnUri.Clicked += async (s, e) => + { + info.Text = ""; + checkUri = await image.LoadAsync("http://pe.tedcdn.com/images/ted/2e306b9655267cee35e45688ace775590b820510_615x461.jpg", default(CancellationToken)); + }; + + btnStream.Clicked += async (s, e) => + { + info.Text = ""; + FileStream fs = new FileStream(Program.Current.DirectoryInfo.Resource + "test2.jpg", FileMode.Open, FileAccess.Read); + checkStream = await image.LoadAsync(fs, default(CancellationToken)); + fs.Dispose(); + ManualTest.Confirm(); + }; + + _testPage.ExecuteTC(box); + await ManualTest.WaitForConfirm(); + + //Clean up + box.Unrealize(); + box = null; + image.LoadingCompleted -= (s, e) => { }; + btnFile.Clicked -= async (s, e) => { }; + btnUri.Clicked -= async (s, e) => { }; + btnStream.Clicked -= async (s, e) => { }; + + // Validation + if (checkFile && checkUri && checkStream && checkLoadingCompleted) + { + Assert.Pass("Image.LoadAsync working properly"); + } + else + { + Assert.Fail("Image.LoadAsync doesn't working properly"); + } + } + + [Test] + [Category("P1")] [Description("Test: Check LoadingCompleted is invoked successfully")] [Property("SPEC", "ElmSharp.Image.LoadingCompleted E")] [Property("SPEC_URL", "-")] @@ -286,7 +457,7 @@ namespace ElmSharp.Tests [Step(3, "Click 'Check' button")] [Step(4, "Test results are automatically determined")] [Postcondition(1, "NA")] - public static async Task LoadingCompleted_Check() + public async Task LoadingCompleted_EVENT() { bool isValid = false; Box box = new Box(_window) @@ -349,6 +520,9 @@ namespace ElmSharp.Tests //Clean up box.Unrealize(); box = null; + image.LoadingCompleted -= (s, e) => { }; + loadButton.Clicked -= async (s, e) => { }; + validateButton.Clicked -= (s, e) => { }; if (isValid) { @@ -371,9 +545,9 @@ namespace ElmSharp.Tests [Step(1, "Click run TC")] [Step(2, "Click 'Load' button")] [Step(3, "Click 'Check' button")] - [Step(3, "Test results are automatically determined")] + [Step(4, "Test results are automatically determined")] [Postcondition(1, "NA")] - public static async Task LoadingFailed_Check() + public async Task LoadingFailed_EVENT() { bool isValid = false; Box box = new Box(_window) @@ -436,6 +610,9 @@ namespace ElmSharp.Tests //Clean up box.Unrealize(); box = null; + image.LoadingFailed -= (s, e) => { }; + loadButton.Clicked -= async (s, e) => { }; + validateButton.Clicked -= (s, e) => { }; if (isValid) { @@ -447,4 +624,4 @@ namespace ElmSharp.Tests } } } -} \ No newline at end of file +} diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSButton.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSButton.cs index d779358..d953ee7 100755 --- a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSButton.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSButton.cs @@ -16,6 +16,7 @@ using NUnit.Framework; using NUnit.Framework.TUnit; +using System; using ElmSharpForTizen.Tizen; namespace ElmSharp.Tests { @@ -111,5 +112,23 @@ namespace ElmSharp.Tests { Assert.AreEqual(Color.Blue, _button.BackgroundColor, "BackgroundColor doesn't set and get successfully."); } + [Test] + [Category("P1")] + [Description("Test DeleteColorClass method")] + [Property("SPEC", "ElmSharp.Button.DeleteColorClass M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")] + public void DeleteColorClass_CHECK_METHOD() + { + try + { + _button.DeleteColorClass("button/bg"); + } + catch (Exception ex) + { + Assert.IsFalse(true, "DeleteColorClass method failed: " + ex.ToString()); + } + } } } diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSEntry.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSEntry.cs index e6ad611..71be0ec 100755 --- a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSEntry.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSEntry.cs @@ -321,6 +321,26 @@ namespace ElmSharp.Tests [Test] [Category("P1")] + [Description("Check ForceCalculation method")] + [Property("SPEC", "ElmSharp.Entry.ForceCalculation M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")] + public void ForceCalculation_CHECK_METHOD() + { + /* TEST CODE */ + try + { + _entry.ForceCalculation(); + } + catch (Exception ex) + { + Assert.Fail("Should not throw exception. " + ex.ToString()); + } + } + + [Test] + [Category("P1")] [Description("Check SetPartColor method whether move cursor up")] [Property("SPEC", "ElmSharp.Entry.SetPartColor M")] [Property("SPEC_URL", "-")] diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSEvasCanvas.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSEvasCanvas.cs new file mode 100755 index 0000000..564f462 --- /dev/null +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSEvasCanvas.cs @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ + +using NUnit.Framework; +using NUnit.Framework.TUnit; +using System; +using ElmSharpForTizen.Tizen; +namespace ElmSharp.Tests +{ + + [TestFixture] + [Description("Testing ElmSharp.EvasCanvas class")] + public class EvasCanvasTests + { + private static EvasObject _evasObject; + private static EvasCanvas _evasCanvas; + private static MainWindow _window = MainWindow.GetInstance(); + + [SetUp] + public static void Init() + { + LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST"); + _evasObject = (EvasObject)new Polygon(_window); + _evasCanvas = _evasObject.EvasCanvas; + } + + [TearDown] + public static void Destroy() + { + LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Postconditions for each TEST"); + if (_evasObject != null) + { + _evasObject.Unrealize(); + _evasObject = null; + } + } + + [Test] + [Category("P1")] + [Description("Check whether AddDamageRectangle method work well")] + [Property("SPEC", "ElmSharp.EvasCanvas.AddDamageRectangle M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")] + public void AddDamageRectangle_CHECK_METHOD() + { + try + { + _evasCanvas.AddDamageRectangle(0, 0, 100, 100); + } + catch (Exception ex) + { + Assert.IsFalse(true, "AddDamageRectangle method failed: " + ex.ToString()); + } + } + + [Test] + [Category("P1")] + [Description("Check whether AddObscuredRectangle method work well")] + [Property("SPEC", "ElmSharp.EvasCanvas.AddObscuredRectangle M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")] + public void AddObscuredRectangle_CHECK_METHOD() + { + try + { + _evasCanvas.AddObscuredRectangle(0, 0, 100, 100); + } + catch (Exception ex) + { + Assert.IsFalse(true, "AddObscuredRectangle method failed: " + ex.ToString()); + } + } + + [Test] + [Category("P1")] + [Description("Check whether ClearObscuredRectangle method work well")] + [Property("SPEC", "ElmSharp.EvasCanvas.ClearObscuredRectangle M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")] + public void ClearObscuredRectangle_CHECK_METHOD() + { + try + { + _evasCanvas.ClearObscuredRectangle(); + } + catch (Exception ex) + { + Assert.IsFalse(true, "ClearObscuredRectangle method failed: " + ex.ToString()); + } + } + + [Test] + [Category("P1")] + [Description("Check whether FlushImageCache method work well")] + [Property("SPEC", "ElmSharp.EvasCanvas.FlushImageCache M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")] + public void FlushImageCache_CHECK_METHOD() + { + try + { + _evasCanvas.FlushImageCache(); + } + catch (Exception ex) + { + Assert.IsFalse(true, "FlushImageCache method failed: " + ex.ToString()); + } + } + } +} diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSEvasObject.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSEvasObject.cs index 8b73b0f..978d86d 100755 --- a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSEvasObject.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSEvasObject.cs @@ -820,6 +820,25 @@ namespace ElmSharp.Tests [Test] [Category("P1")] + [Description("Check Calculate method")] + [Property("SPEC", "ElmSharp.EvasObject.Calculate M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")] + public void Calculate_CHECK_METHOD() + { + try + { + _evasObject.Calculate(); + } + catch (Exception) + { + Assert.IsFalse(true, "Calculate method failed"); + } + } + + [Test] + [Category("P1")] [Description("Check whether get value of AllEventsFrozen are identical with the set value or not.")] [Property("SPEC", "ElmSharp.EvasObject.AllEventsFrozen A")] [Property("SPEC_URL", "-")] diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSGenList.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSGenList.cs index f87d5ce..e51d7c8 100755 --- a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSGenList.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSGenList.cs @@ -901,6 +901,44 @@ namespace ElmSharp.Tests } } + + [Test] + [Category("P1")] + [Description("Check whether setting and getting HorizontalScrollBarVisiblePolicy are equal.")] + [Property("SPEC", "ElmSharp.HorizontalScrollBarVisiblePolicy A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRE")] + [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")] + public void HorizontalScrollBarVisiblePolicy_CHECK() + { + _genList.HorizontalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Auto; + Assert.AreEqual(ScrollBarVisiblePolicy.Auto, _genList.HorizontalScrollBarVisiblePolicy, "The HorizontalScrollBarVisiblePolicy value should be Auto."); + + _genList.HorizontalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Invisible; + Assert.AreEqual(ScrollBarVisiblePolicy.Invisible, _genList.HorizontalScrollBarVisiblePolicy, "The HorizontalScrollBarVisiblePolicy value should be Invisible."); + + _genList.HorizontalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Visible; + Assert.AreEqual(ScrollBarVisiblePolicy.Visible, _genList.HorizontalScrollBarVisiblePolicy, "The HorizontalScrollBarVisiblePolicy value should be Visible."); + } + + [Test] + [Category("P1")] + [Description("Check whether setting and getting VerticalScrollBarVisiblePolicy are equal.")] + [Property("SPEC", "ElmSharp.VerticalScrollBarVisiblePolicy A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRE")] + [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")] + public void VerticalScrollBarVisiblePolicy_CHECK() + { + _genList.VerticalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Auto; + Assert.AreEqual(ScrollBarVisiblePolicy.Auto, _genList.VerticalScrollBarVisiblePolicy, "The VerticalScrollBarVisiblePolicy value should be Auto."); + + _genList.VerticalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Invisible; + Assert.AreEqual(ScrollBarVisiblePolicy.Invisible, _genList.VerticalScrollBarVisiblePolicy, "The VerticalScrollBarVisiblePolicy value should be Invisible."); + + _genList.VerticalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Visible; + Assert.AreEqual(ScrollBarVisiblePolicy.Visible, _genList.VerticalScrollBarVisiblePolicy, "The VerticalScrollBarVisiblePolicy value should be Visible."); + } } } diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSLayout.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSLayout.cs index f90867e..6b3de52 100755 --- a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSLayout.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSLayout.cs @@ -18,12 +18,16 @@ using NUnit.Framework; using NUnit.Framework.TUnit; using System; using ElmSharpForTizen.Tizen; -using System.Threading; +using System.Threading.Tasks; namespace ElmSharp.Tests { public class Layout_T : Layout { + bool _isRealized; + + public bool CheckOnRealized => _isRealized; + public Layout_T(EvasObject parent) : base(parent) { } @@ -36,6 +40,12 @@ namespace ElmSharp.Tests { base.CreateHandle(MainWindow.GetInstance()); } + + protected override void OnRealized() + { + _isRealized = true; + base.OnRealized(); + } } [TestFixture] @@ -77,13 +87,13 @@ namespace ElmSharp.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "EVL")] [Property("AUTHOR", "Li Hongqing, hongqing.li@samsung.com")] - public void LanguageChanged_CHECK() + public async Task LanguageChanged_CHECK() { _mark = 0; _layout.LanguageChanged += OnLanguageChanged; Elementary.SetLanguage("CHS"); - Thread.Sleep(5000); + await Task.Delay(5000); if (_mark == 0) { Assert.Fail("The event should be invoked, but is not invoked"); @@ -93,6 +103,28 @@ namespace ElmSharp.Tests [Test] [Category("P1")] + [Description("Check ThemeChanged is invoked successfully")] + [Property("SPEC", "ElmSharp.Layout.ThemeChanged E")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "EVL")] + [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")] + public async Task ThemeChanged_CHECK() + { + _mark = 0; + _layout = new Button(_window); + _layout.ThemeChanged += OnThemeChanged; + _layout.Style = "circle"; + + await Task.Delay(5000); + if (_mark == 0) + { + Assert.Fail("The event should be invoked, but is not invoked"); + } + _layout.ThemeChanged -= OnThemeChanged; + } + + [Test] + [Category("P1")] [Description("Create a Layout instance. Check whether object is successfully created or not.")] [Property("SPEC", "ElmSharp.Layout.Layout C")] [Property("SPEC_URL", "-")] @@ -213,6 +245,21 @@ namespace ElmSharp.Tests [Test] [Category("P1")] + [Description("Check whether GetEdjeData is succesfully.")] + [Property("SPEC", "ElmSharp.Layout.GetEdjeData M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Kangho Hur, kangho.hur@samsung.com")] + public void GetEdjeData_CHECK() + { + _layout = new Entry(_window); + + Assert.IsNotNull(_layout.GetEdjeData("focus_highlight"), "Cannot get the edje data."); + Assert.IsNull(_layout.GetEdjeData("none"), "The edje data should be null."); + } + + [Test] + [Category("P1")] [Description("Check invoke SetVerticalTextAlignment without exception")] [Property("SPEC", "ElmSharp.Layout.SetVerticalTextAlignment M")] [Property("SPEC_URL", "-")] @@ -232,6 +279,19 @@ namespace ElmSharp.Tests [Test] [Category("P1")] + [Description("Check invoke GetVerticalTextAlignment without exception")] + [Property("SPEC", "ElmSharp.Layout.GetVerticalTextAlignment M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Kangho Hur, kangho.hur@samsung.com")] + public void GetVerticalTextAlignment_CHECK() + { + var mark = _layout.GetVerticalTextAlignment("bg"); + Assert.IsInstanceOf(mark, "Should be instance of double"); + } + + [Test] + [Category("P1")] [Description("Check whether setting and getting TextBlockAccessibility are equal.")] [Property("SPEC", "ElmSharp.Layout.TextBlockAccessibility A")] [Property("SPEC_URL", "-")] @@ -504,5 +564,19 @@ namespace ElmSharp.Tests Assert.IsInstanceOf(mark); naviFrameTemp = null; } + + [Test] + [Category("P1")] + [Description("Check whether OnRelaized is successfully invoked or not.")] + [Property("SPEC", "ElmSharp.Layout.OnRealized M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Kangho Hur, kangho.hur@samsung.com")] + public void OnRealized_Check() + { + Layout_T layout_T = new Layout_T(); + layout_T.Realize(_window); + Assert.True(layout_T.CheckOnRealized); + } } } diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSPoint.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSPoint.cs index d288384..6aaaa45 100755 --- a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSPoint.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSPoint.cs @@ -173,5 +173,21 @@ namespace ElmSharp.Tests Assert.AreEqual("{X=100 Y=200}", p.ToString(), "The Point's string should be equal to new create Point."); } + + [Test] + [Category("P1")] + [Description("Check whether Point.GetHashCode() working properly or not.")] + [Property("SPEC", "ElmSharp.Point.GetHashCode M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Kangho Hur, kangho.hur@samsung.com")] + public void GetHashCode_CHECK() + { + bool result = new Point().GetHashCode() == new Point().GetHashCode(); + if (result) + Assert.Pass(); + else + Assert.Fail(); + } } } diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSPoint3D.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSPoint3D.cs index e316d33..2ac20f4 100755 --- a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSPoint3D.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSPoint3D.cs @@ -197,5 +197,21 @@ namespace ElmSharp.Tests Assert.AreEqual("{X=100 Y=200 Z=300}", p.ToString(), "The Point3D's string should be equal to new create Point3D."); } + + [Test] + [Category("P1")] + [Description("Check whether Point3D.GetHashCode() working properly or not.")] + [Property("SPEC", "ElmSharp.Point3D.GetHashCode M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Kangho Hur, kangho.hur@samsung.com")] + public void GetHashCode_CHECK() + { + bool result = new Point3D().GetHashCode() == new Point3D().GetHashCode(); + if (result) + Assert.Pass(); + else + Assert.Fail(); + } } } diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSProgressBar.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSProgressBar.cs index d14da23..48c191b 100755 --- a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSProgressBar.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSProgressBar.cs @@ -206,6 +206,26 @@ namespace ElmSharp.Tests [Test] [Category("P1")] + [Description("Check StopPluse (obsolete) returns without any exceptions.")] + [Property("SPEC", "ElmSharp.ProgressBar.StopPluse M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Kangho Hur, kangho.hur@samsung.com")] + public void StopPluse_CHECK() + { + try + { + _progress.IsPulseMode = true; + _progress.StopPluse(); + } + catch (Exception ex) + { + Assert.Fail("Should not throw exception. " + ex.ToString()); + } + } + + [Test] + [Category("P1")] [Description("Check whether get value of Color is identical with the set value or not")] [Property("SPEC", "ElmSharp.ProgressBar.Color A")] [Property("SPEC_URL", "-")] diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSRect.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSRect.cs index 893073c..0f13231 100755 --- a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSRect.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSRect.cs @@ -347,5 +347,21 @@ namespace ElmSharp.Tests Assert.AreEqual("{X=100 Y=200 Width=300 Height=400}", r.ToString(), "The Rect's string should be equal to new create Rect."); } + + [Test] + [Category("P1")] + [Description("Check whether Rect.GetHashCode() working properly or not.")] + [Property("SPEC", "ElmSharp.Rect.GetHashCode M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Kangho Hur, kangho.hur@samsung.com")] + public void GetHashCode_CHECK() + { + bool result = new Rect(100, 100, 100, 100).GetHashCode() == new Rect(100, 100, 100, 100).GetHashCode(); + if (result) + Assert.Pass(); + else + Assert.Fail(); + } } } diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSSize.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSSize.cs index fbb6f45..e07eaff 100755 --- a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSSize.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSSize.cs @@ -213,6 +213,22 @@ namespace ElmSharp.Tests Assert.AreEqual("{Width=100 Height=200}", s.ToString(), "The Size's string should be equal to new create Size."); } + + [Test] + [Category("P1")] + [Description("Check whether Size.GetHashCode() working properly or not.")] + [Property("SPEC", "ElmSharp.Size.GetHashCode M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Kangho Hur, kangho.hur@samsung.com")] + public void GetHashCode_CHECK() + { + bool result = new Size(100, 100).GetHashCode() == new Size(100, 100).GetHashCode(); + if (result) + Assert.Pass(); + else + Assert.Fail(); + } } } diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSWindow.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSWindow.cs index 374e1f1..2ed9d91 100755 --- a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSWindow.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSWindow.cs @@ -219,6 +219,20 @@ namespace ElmSharp.Tests { [Test] [Category("P1")] + [Description("Check whether get value of AavailableRotations(obsolete) are identical with the set value or not.")] + [Property("SPEC", "ElmSharp.Window.AavailableRotations A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "Kangho Hur, kangho.hur@samsung.com")] + public void AavailableRotations_PROPERTY_SET_GET() + { + var _availableRotations = DisplayRotation.Degree_90; + _testwindow.AavailableRotations = _availableRotations; + Assert.AreEqual(_availableRotations, _testwindow.AvailableRotations, "Retrieved AvailableRotations of window should be equal to set value"); + } + + [Test] + [Category("P1")] [Description("Check whether get value of AutoDeletion are identical with the set value or not.")] [Property("SPEC", "ElmSharp.Window.AutoDeletion A")] [Property("SPEC_URL", "-")] -- 2.7.4