[Applications.Cion][TCSACR-448] Add cion TCs 13/264413/36
authorSangyoon Jang <jeremy.jang@samsung.com>
Thu, 16 Sep 2021 04:53:23 +0000 (13:53 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Fri, 3 Mar 2023 07:37:25 +0000 (16:37 +0900)
Change-Id: Ie03c921f724f4414d7fbd93f26adcd6b5d3699c5
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
23 files changed:
tct-suite-vs/Tizen.Applications.Cion.Tests/Program.cs [new file with mode: 0755]
tct-suite-vs/Tizen.Applications.Cion.Tests/Tizen.Applications.Cion.Tests.csproj [new file with mode: 0755]
tct-suite-vs/Tizen.Applications.Cion.Tests/Tizen.Applications.Cion.Tests.sln [new file with mode: 0755]
tct-suite-vs/Tizen.Applications.Cion.Tests/shared/res/Tizen.Applications.Cion.Tests.png [new file with mode: 0755]
tct-suite-vs/Tizen.Applications.Cion.Tests/shared/res/rootCA/ca.pem [new file with mode: 0644]
tct-suite-vs/Tizen.Applications.Cion.Tests/shared/res/server/test-server.key [new file with mode: 0644]
tct-suite-vs/Tizen.Applications.Cion.Tests/shared/res/server/test-server.pem [new file with mode: 0644]
tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSClientBase.cs [new file with mode: 0755]
tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSConnectionResult.cs [new file with mode: 0644]
tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSDataPayload.cs [new file with mode: 0644]
tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSFilePayload.cs [new file with mode: 0644]
tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSGroupBase.cs [new file with mode: 0755]
tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSPayload.cs [new file with mode: 0644]
tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSPayloadAsyncResult.cs [new file with mode: 0644]
tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSPeerInfo.cs [new file with mode: 0644]
tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSSecurityInfo.cs [new file with mode: 0644]
tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSServerBase.cs [new file with mode: 0755]
tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TestClient.cs [new file with mode: 0755]
tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TestGroup.cs [new file with mode: 0755]
tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TestHelper.cs [new file with mode: 0755]
tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TestServer.cs [new file with mode: 0755]
tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/WaitHelper.cs [new file with mode: 0755]
tct-suite-vs/Tizen.Applications.Cion.Tests/tizen-manifest.xml [new file with mode: 0755]

diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/Program.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/Program.cs
new file mode 100755 (executable)
index 0000000..37e51cd
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ *  Copyright (c) 2018 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 System;
+using NUnitLite.TUnit;
+using Tizen.Applications;
+
+namespace TCT.Tizen
+{
+
+    class Program : ServiceApplication
+    {
+        protected override void OnCreate()
+        {
+            base.OnCreate();
+
+            Console.WriteLine("TCT : OnCreate()");
+
+            TRunner t = new TRunner();
+            t.LoadTestsuite();
+            t.Execute();
+        }
+
+        static void Main(string[] args)
+        {
+            Console.WriteLine("TCT : Main()");
+            var app = new Program();
+            app.Run(args);
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/Tizen.Applications.Cion.Tests.csproj b/tct-suite-vs/Tizen.Applications.Cion.Tests/Tizen.Applications.Cion.Tests.csproj
new file mode 100755 (executable)
index 0000000..3b2d357
--- /dev/null
@@ -0,0 +1,41 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <!-- Property Group for .NET Core Project -->
+  <PropertyGroup>
+    <OutputType>Exe</OutputType>
+    <TargetFramework>tizen11.0</TargetFramework>
+    <TargetFrameworkIdentifier>Tizen</TargetFrameworkIdentifier>
+  </PropertyGroup>
+
+  <!-- Property Group for Tizen Project -->
+  <PropertyGroup>
+    <TizenCreateTpkOnBuild>true</TizenCreateTpkOnBuild>
+  </PropertyGroup>
+
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugType>portable</DebugType>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>None</DebugType>
+  </PropertyGroup>
+
+  <ItemGroup>
+       <Folder Include="lib\" />
+  </ItemGroup>
+
+  <Import Project="..\Common\dependencies.props" />
+
+  <ItemGroup>
+    <PackageReference Include="Tizen.NET" Version="$(TizenNETVersion)">
+      <ExcludeAssets>Runtime</ExcludeAssets>
+    </PackageReference>
+    <PackageReference Include="Tizen.NET.Sdk" Version="$(TizenNETSdkVersion)" />
+  </ItemGroup>
+
+  <!-- Include Nuget Package for Tizen Project building -->
+  <ItemGroup>
+    <ProjectReference Include="..\nunit.framework\nunit.framework.csproj" />
+    <ProjectReference Include="..\nunitlite\nunitlite.csproj" />
+  </ItemGroup>
+
+</Project>
diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/Tizen.Applications.Cion.Tests.sln b/tct-suite-vs/Tizen.Applications.Cion.Tests/Tizen.Applications.Cion.Tests.sln
new file mode 100755 (executable)
index 0000000..2fc0659
--- /dev/null
@@ -0,0 +1,78 @@
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Visual Studio Version 16\r
+VisualStudioVersion = 16.0.31624.102\r
+MinimumVisualStudioVersion = 15.0.26124.0\r
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Applications.Cion.Tests", "Tizen.Applications.Cion.Tests.csproj", "{D92BEEAC-3B2A-45F8-8C53-53B92550404A}"\r
+EndProject\r
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit.framework", "..\nunit.framework\nunit.framework.csproj", "{B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}"\r
+EndProject\r
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunitlite", "..\nunitlite\nunitlite.csproj", "{FDB8025A-C029-461F-895E-287B4C65939B}"\r
+EndProject\r
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoTemplate", "..\Template\AutoTemplate\AutoTemplate.csproj", "{B11ABB0C-C3C1-4B5C-8251-A15628A775F3}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Any CPU = Debug|Any CPU\r
+               Debug|x64 = Debug|x64\r
+               Debug|x86 = Debug|x86\r
+               Release|Any CPU = Release|Any CPU\r
+               Release|x64 = Release|x64\r
+               Release|x86 = Release|x86\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x64.ActiveCfg = Debug|Any CPU\r
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x64.Build.0 = Debug|Any CPU\r
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x86.ActiveCfg = Debug|Any CPU\r
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x86.Build.0 = Debug|Any CPU\r
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x64.ActiveCfg = Release|Any CPU\r
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x64.Build.0 = Release|Any CPU\r
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x86.ActiveCfg = Release|Any CPU\r
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x86.Build.0 = Release|Any CPU\r
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x64.ActiveCfg = Debug|Any CPU\r
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x64.Build.0 = Debug|Any CPU\r
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x86.ActiveCfg = Debug|Any CPU\r
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x86.Build.0 = Debug|Any CPU\r
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x64.ActiveCfg = Release|Any CPU\r
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x64.Build.0 = Release|Any CPU\r
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x86.ActiveCfg = Release|Any CPU\r
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x86.Build.0 = Release|Any CPU\r
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x64.ActiveCfg = Debug|Any CPU\r
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x64.Build.0 = Debug|Any CPU\r
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x86.ActiveCfg = Debug|Any CPU\r
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x86.Build.0 = Debug|Any CPU\r
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x64.ActiveCfg = Release|Any CPU\r
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x64.Build.0 = Release|Any CPU\r
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x86.ActiveCfg = Release|Any CPU\r
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x86.Build.0 = Release|Any CPU\r
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|x64.ActiveCfg = Debug|Any CPU\r
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|x64.Build.0 = Debug|Any CPU\r
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|x86.ActiveCfg = Debug|Any CPU\r
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|x86.Build.0 = Debug|Any CPU\r
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|x64.ActiveCfg = Release|Any CPU\r
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|x64.Build.0 = Release|Any CPU\r
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|x86.ActiveCfg = Release|Any CPU\r
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|x86.Build.0 = Release|Any CPU\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+       GlobalSection(ExtensibilityGlobals) = postSolution\r
+               SolutionGuid = {ED382B91-9930-40B6-B3D7-362304C78680}\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/shared/res/Tizen.Applications.Cion.Tests.png b/tct-suite-vs/Tizen.Applications.Cion.Tests/shared/res/Tizen.Applications.Cion.Tests.png
new file mode 100755 (executable)
index 0000000..9765b1b
Binary files /dev/null and b/tct-suite-vs/Tizen.Applications.Cion.Tests/shared/res/Tizen.Applications.Cion.Tests.png differ
diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/shared/res/rootCA/ca.pem b/tct-suite-vs/Tizen.Applications.Cion.Tests/shared/res/rootCA/ca.pem
new file mode 100644 (file)
index 0000000..81894a6
--- /dev/null
@@ -0,0 +1,18 @@
+-----BEGIN CERTIFICATE-----
+MIIC9TCCAd2gAwIBAgIUMLWz1S0J2T3+2FJHiD/b7CTaJTAwDQYJKoZIhvcNAQEL
+BQAwFDESMBAGA1UEAwwJbG9jYWxob3N0MB4XDTIxMDMxNjAyMjk0MFoXDTI0MDEw
+NDAyMjk0MFowFDESMBAGA1UEAwwJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0BAQEF
+AAOCAQ8AMIIBCgKCAQEAnxbMmTZddJuPLBDcBHb3aMPz6blTrnBCiLr67dYKMLXM
+Sd6eAB/I89PMBpbFIvK9etNcN/K88vRufqEc75r4fHuueOQ2AnGgCoTlxFzuZQ7t
+2uBvQ5+bOlyHao+bTbfiSGJlG2jDdWqg3S6wp25Hbc6rVf3cvon9eWjAX0DTvuAT
+JoFne0J8K94wMFyPYxQjfIqMc3u/Xc6oSIVpr9U62tCLNM57hT77Gq58vyAgqJoL
+3kkAvEdT0fgNYOfKfU8U2ZMyKOz1NYDXwFzkjkCYLYmH/IlquBoRXTrU6AA+HMXf
+lOWzxAsKDvS8jrkR33N7R7GhkhmcXinp2lBDRHQ1CQIDAQABoz8wPTAPBgNVHRMB
+Af8EBTADAQH/MAsGA1UdDwQEAwICBDAdBgNVHQ4EFgQUR6/jvQX4Vcq4yHpB+sBi
+aUkF91wwDQYJKoZIhvcNAQELBQADggEBAHHw/bR2KahILeXj1Ptof0urm71tRyPZ
+56dvy9N5X6FzAslb+nYa9JOGSgv8O5ts60UnFD4sOAXC6h06Ek0UynZqkzZKWabb
+M1YCjANs3PD3k+A3gj3o5+oQWlh4xLrt4cZMzfftKGfEO6qUSACt/OR4ldTB0mDH
+tCjrvOp6jJRmaS7aGO39v4pmzFX8wM2+4Iil4mvssaepwFit7X7SkMTjSzKPXWJc
+4dmzHf/bJBHu251fmmDvwzcarqUyy093Uj6ukS7tUmuFNtuyRwaLOGuJ3mPn+t5n
+C8nzI25krt5zL/FqCSq3Y//3KyLn/msNgKdRFmU/2uwUl8P4cRHhUmM=
+-----END CERTIFICATE-----
diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/shared/res/server/test-server.key b/tct-suite-vs/Tizen.Applications.Cion.Tests/shared/res/server/test-server.key
new file mode 100644 (file)
index 0000000..3ba7168
--- /dev/null
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEowIBAAKCAQEAk94UgCbQw/58MzFY7AGp+DpS0DJhqMnnpqdLwe8mryhY+GRM
+shL6GrNiQ4KzPlHiSCYHxsvjHnYz/xBnIU8F9iPkI71NQ45HW7Br6gQVnsipBybm
+NFt1qzKJjJDCHhViE1F87/ZnjXRBR0daXS94fT4H5Ei9BOnSyWr7OwGFE6gGwHFC
+3AUynJEN7ZV1mPXkLD0FzNu8ZTJhjf9Ly+kcchMowvjOJQ5Yi2qDGF6c5MiZWf54
+GMydsi5Z2M7rdcLECTHFiOLq+uG+Ott18+Ic49SKs6N0wYqi5wWAKW4+PdCArurf
+dlcEpDP1v0xwrIXHsOKDih+4Hm3LqxFQigBjHQIDAQABAoIBAAYl9MpDUujjWvyx
+75WYmB2nJyxa++6NvqESUbcVn5Em51Qkr3+0BEw56zsNYzCTLQp88lPUxHPOzGit
+oOwkogXTBjhqNZ06fEMWudX4J4H7q/ONLYM9zk25AzkiB8BCeVp+R+ieYT3jeJdj
+IyG+yI7EloVqdNmQc2BGn32bmZHwmXEZJ1JslpuezOAQWO3WGkB4lEHfumIHl+xM
+dnRXSuHYOhNfiDs4k4r75prL02K8PjfC1Fkg35QNY0RtwDQii4HCUJdkDZywnD55
+d7aTDPxXODRs4vQ9yMv2Lb14u9au541It1Lz/ZfDicQ2TCZZkYbMmtooX6dKVuwa
+B2rKWqECgYEAxDHLx3Tw0cmocKj3OiRtevBTFa5kSaIlGCtQWdWEyi9uLqc55MHy
+oGlpG6VR9R4HfSvx63S17OBXnj9bOrr3IPurmpcf1+7BT2H9fZZNsKIecTkm1Ms3
+PQH2cMiDz8KmQeWDpv5eO+Qnah6ippbUrtUItsaAUOJW6nQIWz4UhekCgYEAwPEL
+d38jT/z1KAmZiSFje3/aFjfVRnFSb0FkABKZYRc7S+DJAD0sLot2x61xWOdjW3+W
+u230ncF+3T+7l8BEk+Yti3QY2Is2nDbu3NXyCItYSo0UT3B6kcp5hxjoziv+WdM+
+A/wHY2garmkiwamuem7cvrHYih6vbSbJfyF6zxUCgYEAtYUI8Cp+4Op94HZD/tRT
+Qqp1hJrMCOBvB5STi/okGNiXTazEwKS88bN1XvGvCWVWMnZlJp7d7yKFjlE5+/Wd
+zjNrSuVFvggVbHfSC87zZFgqaEEjbz/xhI17UFAEvEVwg4lxLCEuWKU33lQn0o+8
+iWFq5Yh0keFH3zWpwZmHbXkCgYBkaI0pIPcFl4UV0vkeDkwxZzXdviy1vh/CWmtq
+RkOf7XEkadTw1OT7TAUCoVaNh82DPoD5BZ35w0r8ZUCBFsQZm/4zxrVva/N9lHD2
+aDjPDYVjNsxNEyIWYSKhlesB8I8ru+1YMX6+0tyfy4MU+fMdMDic3Pzt1E5DJZ5T
+FN9OiQKBgALb2ZnIhjDo9NiOtJGQbrpAReDTKbtvtzxafjtxQcO6FgKOumr0RWnV
+v2djNeCQCiYkj7aMjSI0hrBtQbIvJzbf8hCAt9wMptK4ZrkyXEDTqG1Pwg7dtcso
+6OmSqr5UGw4n7kWq7qGFgSAX1h661xAslLX/bUajgvUoN/ciKwaF
+-----END RSA PRIVATE KEY-----
diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/shared/res/server/test-server.pem b/tct-suite-vs/Tizen.Applications.Cion.Tests/shared/res/server/test-server.pem
new file mode 100644 (file)
index 0000000..aa928b1
--- /dev/null
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDATCCAemgAwIBAgIEAINoFTANBgkqhkiG9w0BAQsFADAUMRIwEAYDVQQDDAls
+b2NhbGhvc3QwHhcNMjEwMzE2MDIyOTQwWhcNMjQwMTA0MDIyOTQwWjAUMRIwEAYD
+VQQDDAlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCT
+3hSAJtDD/nwzMVjsAan4OlLQMmGoyeemp0vB7yavKFj4ZEyyEvoas2JDgrM+UeJI
+JgfGy+MedjP/EGchTwX2I+QjvU1DjkdbsGvqBBWeyKkHJuY0W3WrMomMkMIeFWIT
+UXzv9meNdEFHR1pdL3h9PgfkSL0E6dLJavs7AYUTqAbAcULcBTKckQ3tlXWY9eQs
+PQXM27xlMmGN/0vL6RxyEyjC+M4lDliLaoMYXpzkyJlZ/ngYzJ2yLlnYzut1wsQJ
+McWI4ur64b4623Xz4hzj1Iqzo3TBiqLnBYApbj490ICu6t92VwSkM/W/THCshcew
+4oOKH7gebcurEVCKAGMdAgMBAAGjWzBZMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYE
+FFFL10hPYuHhvcwoI8JXVKI35heLMB8GA1UdIwQYMBaAFEev470F+FXKuMh6QfrA
+YmlJBfdcMAkGA1UdEgQCMAAwDQYJKoZIhvcNAQELBQADggEBAGyZ+vLjzg/5AQ1X
+BX5akgHl4SPWv6pHHdF8ngSbT5Uqui0Cam/gy2V+WRY3WAAtde8tM6QpgTXFbTae
+qomlM8IwbwG+gB3nHr8WuPCA3/A2b67fDR3GsCDFgeyTPBwggU7hxud1MbFkdGkR
+/7H/LfyPwERfWfBHyNJ+JKlo6FXf9QsZiezW63dd4peVU3f2cihSvvdQIHyZdN9O
+CU9YYl4zNCoKjth2jD8FsOoNKxegJbLX0IAUfccoX8yTc+IcqLwEO8u0R6lF4D4t
+GMICcXeu+iVR85TAOTkhEG8Cp6cIPIN4wDjE0v5Xjbu8Ibh9i+W2fQCSoqwfR0g1
+KcxKMwU=
+-----END CERTIFICATE-----
diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSClientBase.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSClientBase.cs
new file mode 100755 (executable)
index 0000000..e5dd892
--- /dev/null
@@ -0,0 +1,538 @@
+/*
+ *  Copyright (c) 2021 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 System;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tizen.Applications.Cion.Tests
+{
+
+    [TestFixture]
+    [Description("Tizen.Applications.Cion.ClientBase Tests")]
+    public class ClientBaseTests
+    {
+        private TestServer SetupServer(string serviceName)
+        {
+            TestServer _server = new TestServer(serviceName, serviceName);
+            _server.ConnectionRequestEvent += (sender, e) =>
+            {
+                TestServer.ConnectionRequestEventArgs eventArgs = e as TestServer.ConnectionRequestEventArgs;
+                _server.Accept(eventArgs.PeerInfo);
+            };
+            _server.DataReceivedEvent += (sender, e) =>
+            {
+                TestServer.DataReceivedEventArgs eventArgs = e as TestServer.DataReceivedEventArgs;
+                if (Encoding.UTF8.GetString(eventArgs.Data) == TestServer.HelloMessage)
+                {
+                    eventArgs.ReplyData = Encoding.UTF8.GetBytes(TestServer.WorldMessage);
+                }
+                else
+                {
+                    eventArgs.ReplyData = Encoding.UTF8.GetBytes("Wrong message.");
+                }
+            };
+            _server.PayloadReceivedEvent += (sender, e) =>
+            {
+                TestServer.PayloadReceivedEventArgs eventArgs = e as TestServer.PayloadReceivedEventArgs;
+                DataPayload reply = new DataPayload(Encoding.UTF8.GetBytes(TestServer.WorldMessage));
+                _server.SendPayloadAsync(reply, eventArgs.PeerInfo);
+            };
+            _server.Listen();
+
+            return _server;
+        }
+
+        private SecurityInfo CreateSecurityInfo()
+        {
+            SecurityInfo securityInfo = new SecurityInfo();
+
+            string caPath = Application.Current.DirectoryInfo.SharedResource + "/rootCA/ca.pem";
+            string certPath = Application.Current.DirectoryInfo.SharedResource + "/server/test-server.pem";
+            string privateKeyPath = Application.Current.DirectoryInfo.SharedResource + "/server/test-server.key";
+
+            securityInfo.CaPath = caPath;
+            securityInfo.CertPath = certPath;
+            securityInfo.PrivateKeyPath = privateKeyPath;
+
+            return securityInfo;
+        }
+
+        [SetUp]
+        public void Init()
+        {
+        }
+
+        [TearDown]
+        public void Destroy()
+        {
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : ClientBase Constructor - Object should not be null after initializing")]
+        [Property("SPEC", "Tizen.Applications.Cion.ClientBase.ClientBase C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTR")]
+        [Property("COVPARAM", "string")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void ClientBase_INIT()
+        {
+            string serviceName = "ClientBase_INIT";
+            var client = new TestClient(serviceName);
+            Assert.IsNotNull(client, "Object should not be null after initializing");
+            Assert.IsInstanceOf<ClientBase>(client, "client should be an instance of Tizen.Applications.Cion.ClientBase");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : ClientBase Constructor - Object should not be null after initializing")]
+        [Property("SPEC", "Tizen.Applications.Cion.ClientBase.ClientBase C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTR")]
+        [Property("COVPARAM", "string, SecurityInfo")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void ClientBase_INIT_WITH_SECURITY_INFO()
+        {
+            string serviceName = "ClientBase_INIT_WITH_SECURITY_INFO";
+            SecurityInfo securityInfo = CreateSecurityInfo();
+            var client = new TestClient(serviceName, securityInfo);
+            Assert.IsNotNull(client, "Object should not be null after initializing");
+            Assert.IsInstanceOf<ClientBase>(client, "client should be an instance of Tizen.Applications.Cion.ClientBase");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks if ServiceName property return correct value")]
+        [Property("SPEC", "Tizen.Applications.Cion.ClientBase.ServiceName A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void ServiceName_READ_ONLY()
+        {
+            string serviceName = "ServiceName_READ_ONLY";
+            var client = new TestClient(serviceName);
+
+            Assert.IsInstanceOf<string>(client.ServiceName, "ServiceName should be of type string");
+            Assert.IsTrue(client.ServiceName == serviceName, string.Format("Wrong ServiceName, Expected: ({0}), Actual: ({1})", serviceName, client.ServiceName));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks if PeerInfo property return correct value")]
+        [Property("SPEC", "Tizen.Applications.Cion.ClientBase.PeerInfo A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task PeerInfo_READ_ONLY()
+        {
+            string serviceName = "PeerInfo_READ_ONLY";
+            var server = SetupServer(serviceName);
+            var client = new TestClient(serviceName);
+
+            client.TryDiscovery();
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                client.Connect(eventArgs.PeerInfo);
+            };
+
+            WaitHelper helper = new WaitHelper();
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                if (eventArgs.Result.Status != ConnectionStatus.OK)
+                    Assert.Fail("Failed to connect with server");
+                helper.Done();
+            };
+
+            bool connected = await helper.WaitForEvent(60);
+            Assert.IsTrue(connected, string.Format("TIMEOUT: Failed to connect test service {0}", serviceName));
+
+            Assert.IsNotNull(client.PeerInfo);
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of ClientBase.TryDiscovery")]
+        [Property("SPEC", "Tizen.Applications.Cion.ClientBase.TryDiscovery M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task TryDiscovery_CHECK_RESULT()
+        {
+            string serviceName = "TryDiscovery_CHECK_RESULT";
+            var server = SetupServer(serviceName);
+            var client = new TestClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+            client.DiscoveredEvent += (sender, e) => { helper.Done(); };
+            client.TryDiscovery();
+            bool discovered = await helper.WaitForEvent(60);
+
+            Assert.IsTrue(discovered, string.Format("TIMEOUT: Failed to discover test service {0}", serviceName));
+        }
+
+        [Test]
+        [Category("P2")]
+        [Description("Checks the result of ClientBase.StopDiscovery")]
+        [Property("SPEC", "Tizen.Applications.Cion.ClientBase.StopDiscovery M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void StopDiscovery_CHECK_RESULT()
+        {
+            string serviceName = "StopDiscovery_CHECK_RESULT";
+            var client = new TestClient(serviceName);
+
+            try
+            {
+                client.StopDiscovery();
+            }
+            catch (InvalidOperationException)
+            {
+                Assert.Pass("InvalidOperationException occurred.");
+            }
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of ClientBase.Connect")]
+        [Property("SPEC", "Tizen.Applications.Cion.ClientBase.Connect M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task Connect_CHECK_RESULT()
+        {
+            string serviceName = "Connect_CHECK_RESULT";
+            var server = SetupServer(serviceName);
+            var client = new TestClient(serviceName);
+
+            client.TryDiscovery();
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                client.Connect(eventArgs.PeerInfo);
+            };
+
+            WaitHelper helper = new WaitHelper();
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                if (eventArgs.Result.Status != ConnectionStatus.OK)
+                    Assert.Fail("Failed to connect with server");
+                helper.Done();
+            };
+
+            bool connected = await helper.WaitForEvent(60);
+            Assert.IsTrue(connected, string.Format("TIMEOUT: Failed to connect test service {0}", serviceName));
+        }
+
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of ClientBase.Disconnect")]
+        [Property("SPEC", "Tizen.Applications.Cion.ClientBase.Disconnect M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task Disconnect_CHECK_RESULT()
+        {
+            string serviceName = "Disconnect_CHECK_RESULT";
+            var server = SetupServer(serviceName);
+            var client = new TestClient(serviceName);
+
+            client.TryDiscovery();
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                client.Connect(eventArgs.PeerInfo);
+            };
+
+            WaitHelper helper = new WaitHelper();
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                if (eventArgs.Result.Status != ConnectionStatus.OK)
+                    Assert.Fail("Failed to connect with server");
+                helper.Done();
+            };
+
+            client.DisconnectedEvent += (sender, e) =>
+            {
+                helper.Done();
+            };
+
+            bool connected = await helper.WaitForEvent(60);
+            Assert.IsTrue(connected, string.Format("TIMEOUT: Failed to connect test service {0}", serviceName));
+            helper.Reset();
+
+            client.Disconnect();
+            bool disconnected = await helper.WaitForEvent(60);
+            Assert.IsTrue(disconnected, string.Format("TIMEOUT: Failed to disconnect test service {0}", serviceName));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of ClientBase.SendData")]
+        [Property("SPEC", "Tizen.Applications.Cion.ClientBase.SendData M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task SendData_CHECK_RESULT()
+        {
+            string serviceName = "SendData_CHECK_RESULT";
+            var server = SetupServer(serviceName);
+            var client = new TestClient(serviceName);
+
+            client.TryDiscovery();
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                client.Connect(eventArgs.PeerInfo);
+            };
+
+            WaitHelper helper = new WaitHelper();
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                if (eventArgs.Result.Status != ConnectionStatus.OK)
+                    Assert.Fail("Failed to connect with server");
+                helper.Done();
+            };
+
+            bool connected = await helper.WaitForEvent(60);
+            Assert.IsTrue(connected, string.Format("TIMEOUT: Failed to connect test service {0}", serviceName));
+
+            // SendData is a synchronouse API and we run server and client simultaneously here, so we need to invoke SendData() at another thread
+            byte[] reply = null;
+            try
+            {
+                reply = await Task.Run(() =>
+                {
+                    return client.SendData(Encoding.UTF8.GetBytes(TestServer.HelloMessage), 5000);
+                });
+            }
+            catch (Exception e)
+            {
+                Assert.Fail(string.Format("Exception occurred at SendData(): {0}", e.Message));
+            }
+
+            Assert.IsNotNull(reply, "Reply is null");
+            Assert.AreEqual(TestServer.WorldMessage, Encoding.UTF8.GetString(reply), string.Format("Wrong ServiceName, Expected: ({0}), Actual: ({1})", TestServer.WorldMessage, Encoding.UTF8.GetString(reply)));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of ClientBase.SendPayloadAsync")]
+        [Property("SPEC", "Tizen.Applications.Cion.ClientBase.SendPayloadAsync M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task SendPayloadAsync_CHECK_RESULT()
+        {
+            string serviceName = "SendPayloadAsync_CHECK_RESULT";
+            var server = SetupServer(serviceName);
+            var client = new TestClient(serviceName);
+
+            client.TryDiscovery();
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                client.Connect(eventArgs.PeerInfo);
+            };
+
+            WaitHelper helper = new WaitHelper();
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                if (eventArgs.Result.Status != ConnectionStatus.OK)
+                    Assert.Fail("Failed to connect with server");
+                helper.Done();
+            };
+
+            bool connected = await helper.WaitForEvent(60);
+            Assert.IsTrue(connected, string.Format("TIMEOUT: Failed to connect test service {0}", serviceName));
+
+            DataPayload dataPayload = new DataPayload(Encoding.UTF8.GetBytes(TestServer.HelloMessage));
+            PayloadAsyncResult result = await client.SendPayloadAsync(dataPayload);
+
+            Assert.IsNotNull(result);
+            Assert.AreEqual(result.Result, PayloadAsyncResultCode.Success);
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the callback ClientBase.OnConnectionResult invoked")]
+        [Property("SPEC", "Tizen.Applications.Cion.ClientBase.OnConnectionResult M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task OnConnectionResult_CHECK_CB()
+        {
+            string serviceName = "OnConnectionResult_CHECK_CB";
+            var server = SetupServer(serviceName);
+            var client = new TestClient(serviceName);
+
+            client.TryDiscovery();
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                client.Connect(eventArgs.PeerInfo);
+            };
+
+            WaitHelper helper = new WaitHelper();
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                helper.Done();
+            };
+
+            bool connected = await helper.WaitForEvent(60);
+            Assert.IsTrue(connected, string.Format("TIMEOUT: Failed to connect test service {0}", serviceName));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the callback ClientBase.OnDisconnected invoked")]
+        [Property("SPEC", "Tizen.Applications.Cion.ClientBase.OnDisconnected M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task OnDisconnected_CHECK_CB()
+        {
+            string serviceName = "OnDisconnected_CHECK_CB";
+            var server = SetupServer(serviceName);
+            var client = new TestClient(serviceName);
+
+            client.TryDiscovery();
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                client.Connect(eventArgs.PeerInfo);
+            };
+
+            WaitHelper helper = new WaitHelper();
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                if (eventArgs.Result.Status != ConnectionStatus.OK)
+                    Assert.Fail("Failed to connect server");
+                helper.Done();
+            };
+
+            bool connected = await helper.WaitForEvent(60);
+            Assert.IsTrue(connected, string.Format("TIMEOUT: Failed to connect test service {0}", serviceName));
+
+            client.DisconnectedEvent += (sender, e) =>
+            {
+                helper.Done();
+            };
+            helper.Reset();
+            client.Disconnect();
+            bool disconnected = await helper.WaitForEvent(60);
+            Assert.IsTrue(disconnected, string.Format("TIMEOUT: Failed to disconnect test service {0}", serviceName));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the callback ClientBase.OnDiscovered invoked")]
+        [Property("SPEC", "Tizen.Applications.Cion.ClientBase.OnDiscovered M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task OnDiscovered_CHECK_CB()
+        {
+            string serviceName = "OnDiscovered_CHECK_CB";
+            var server = SetupServer(serviceName);
+            var client = new TestClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+
+            client.TryDiscovery();
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                helper.Done();
+            };
+
+            bool discovered = await helper.WaitForEvent(60);
+            Assert.IsTrue(discovered, string.Format("TIMEOUT: Failed to discover test service {0}", serviceName));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the callback ClientBase.OnPayloadReceived invoked")]
+        [Property("SPEC", "Tizen.Applications.Cion.ClientBase.OnPayloadReceived M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task OnPayloadReceived_CHECK_CB()
+        {
+            string serviceName = "OnPayloadReceived_CHECK_CB";
+            var server = SetupServer(serviceName);
+            var client = new TestClient(serviceName);
+
+            client.TryDiscovery();
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                client.Connect(eventArgs.PeerInfo);
+            };
+
+            WaitHelper helper = new WaitHelper();
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                if (eventArgs.Result.Status != ConnectionStatus.OK)
+                    Assert.Fail("Failed to connect server");
+                helper.Done();
+            };
+
+            bool connected = await helper.WaitForEvent(60);
+            Assert.IsTrue(connected, string.Format("TIMEOUT: Failed to connect test service {0}", serviceName));
+
+            helper.Reset();
+            client.PayloadReceivedEvent += (sender, e) =>
+            {
+                helper.Done();
+            };
+            server.SendPayloadAsync(new DataPayload(Encoding.UTF8.GetBytes(TestServer.HelloMessage)));
+
+            bool received = await helper.WaitForEvent(60);
+            Assert.IsTrue(received, "Data was not received");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of ClientBase.Dispose")]
+        [Property("SPEC", "Tizen.Applications.Cion.ClientBase.Dispose M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void Dispose_CHECK_RESULT()
+        {
+            string serviceName = "Dispose_CHECK_RESULT";
+            var client = new TestClient(serviceName);
+
+            try
+            {
+                client.Dispose();
+            }
+            catch
+            {
+                Assert.Fail("Exception occurred while invoking Dispose().");
+            }
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSConnectionResult.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSConnectionResult.cs
new file mode 100644 (file)
index 0000000..e3e6b79
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+ *  Copyright (c) 2021 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 System.Threading.Tasks;
+
+namespace Tizen.Applications.Cion.Tests
+{
+    [TestFixture]
+    [Description("Tizen.Applications.Cion.ConnectionResult Tests")]
+    public class ConnectionResultTests
+    {
+        [SetUp]
+        public void Init()
+        {
+        }
+
+        [TearDown]
+        public void Destroy()
+        {
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : ConnectionResult Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.ConnectionResult.Status A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task Status_PROPERTY_GET()
+        {
+            string serviceName = "Status_PROPERTY_GET";
+            string displayName = "Status_PROPERTY_GET";
+
+            var server = new TestServer(serviceName, displayName);
+            var client = new TestClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+
+            server.ConnectionRequestEvent += (sender, e) =>
+            {
+                TestServer.ConnectionRequestEventArgs eventArgs = e as TestServer.ConnectionRequestEventArgs;
+                server.Accept(eventArgs.PeerInfo);
+            };
+
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                client.Connect(eventArgs.PeerInfo);
+            };
+
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                Assert.AreEqual(ConnectionStatus.OK, eventArgs.Result.Status);
+                helper.Done();
+            };
+
+            server.Listen();
+            client.TryDiscovery();
+
+            bool connected = await helper.WaitForEvent(60);
+            Assert.IsTrue(connected, "Connection not established or error occurred");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : ConnectionResult Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.ConnectionResult.Reason A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task Reason_PROPERTY_GET()
+        {
+            string serviceName = "Reason_PROPERTY_GET";
+            string displayName = "Reason_PROPERTY_GET";
+            string rejectReason = "Test Reason";
+
+            var server = new TestServer(serviceName, displayName);
+            var client = new TestClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+
+            server.ConnectionRequestEvent += (sender, e) =>
+            {
+                TestServer.ConnectionRequestEventArgs eventArgs = e as TestServer.ConnectionRequestEventArgs;
+                server.Reject(eventArgs.PeerInfo, rejectReason);
+            };
+
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                client.Connect(eventArgs.PeerInfo);
+            };
+
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                Assert.AreEqual(rejectReason, eventArgs.Result.Reason, string.Format("Reject reason are not equal. expected {0} actual {0}", rejectReason, eventArgs.Result.Reason));
+                helper.Done();
+            };
+
+            server.Listen();
+            client.TryDiscovery();
+
+            bool connected = await helper.WaitForEvent(60);
+            Assert.IsTrue(connected, "Connection not established or error occurred");
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSDataPayload.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSDataPayload.cs
new file mode 100644 (file)
index 0000000..ae72f9d
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ *  Copyright (c) 2021 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 System;
+using System.Linq;
+using System.Text;
+
+namespace Tizen.Applications.Cion.Tests
+{
+    [TestFixture]
+    [Description("Tizen.Applications.Cion.DataPayload Tests")]
+    public class DataPayloadTests
+    {
+        private DataPayload _dataPayload;
+
+        [SetUp]
+        public void Init()
+        {
+            string data = "Test Data";
+            _dataPayload = new DataPayload(Encoding.UTF8.GetBytes(data));
+        }
+
+        [TearDown]
+        public void Destroy()
+        {
+            _dataPayload = null;
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : DataPayload Constructor - Object should not be null after initializing")]
+        [Property("SPEC", "Tizen.Applications.Cion.DataPayload.DataPayload C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTR")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void DataPayload_INIT()
+        {
+            string data = "DataPayload_INIT";
+            var dataPayload = new DataPayload(Encoding.UTF8.GetBytes(data));
+            Assert.IsNotNull(dataPayload, "Object should not be null after initializing");
+            Assert.IsInstanceOf<DataPayload>(dataPayload, "group should be an instance of Tizen.Applications.Cion.DataPayload");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : DataPayload Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.DataPayload.PayloadType A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void PayloadType_PROPERTY_GET()
+        {
+            Assert.AreEqual(PayloadType.DataPayload, _dataPayload.PayloadType, "Property \"PayloadType\" of DataPayload should be PayloadType.DataPayload");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : DataPayload Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.DataPayload.Data A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRW")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void Data_PROPERTY_SET_GET()
+        {
+            string data = "Data_PROPERTY_SET_GET";
+            byte[] byteData = Encoding.UTF8.GetBytes(data);
+
+            _dataPayload.Data = byteData;
+
+            bool isEqual = byteData.SequenceEqual(_dataPayload.Data);
+            Assert.IsTrue(isEqual, "Property \"Data\": the set value and the get value should be equal");
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSFilePayload.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSFilePayload.cs
new file mode 100644 (file)
index 0000000..fa47008
--- /dev/null
@@ -0,0 +1,308 @@
+/*
+ *  Copyright (c) 2021 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 System;
+using System.Threading.Tasks;
+
+namespace Tizen.Applications.Cion.Tests
+{
+    [TestFixture]
+    [Description("Tizen.Applications.Cion.FilePayload Tests")]
+    public class FilePayloadTests
+    {
+        private FilePayload _filePayload;
+        private readonly string _fileName = "Tizen.Applications.Cion.Tests.png";
+
+        [SetUp]
+        public void Init()
+        {
+            string path = Application.Current.ApplicationInfo.SharedResourcePath + "/" + _fileName;
+            _filePayload = new FilePayload(path);
+        }
+
+        [TearDown]
+        public void Destroy()
+        {
+            _filePayload = null;
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : FilePayload Constructor - Object should not be null after initializing")]
+        [Property("SPEC", "Tizen.Applications.Cion.FilePayload.FilePayload C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTR")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void FilePayload_INIT()
+        {
+            string path = Application.Current.ApplicationInfo.SharedResourcePath + "/Tizen.Applications.Cion.Tests.png";
+            var filePayload = new FilePayload(path);
+            Assert.IsNotNull(filePayload, "Object should not be null after initializing");
+            Assert.IsInstanceOf<FilePayload>(filePayload, "filePayload should be an instance of Tizen.Applications.Cion.FilePayload");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of FilePayload.SaveAsFile")]
+        [Property("SPEC", "Tizen.Applications.Cion.FilePayload.SaveAsFile M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task SaveAsFile_CHECK_RESULT()
+        {
+            string serviceName = "SaveAsFile_CHECK_RESULT";
+            string displayName = "SaveAsFile_CHECK_RESULT";
+
+            var server = new TestServer(serviceName, displayName);
+            var client = new TestClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+
+            server.ConnectionRequestEvent += (sender, e) =>
+            {
+                TestServer.ConnectionRequestEventArgs eventArgs = e as TestServer.ConnectionRequestEventArgs;
+                server.Accept(eventArgs.PeerInfo);
+            };
+
+            server.PayloadReceivedEvent += (sender, e) =>
+            {
+                TestServer.PayloadReceivedEventArgs eventArgs = e as TestServer.PayloadReceivedEventArgs;
+                if (eventArgs.Status != PayloadTransferStatus.Success)
+                    return;
+
+                string path = Application.Current.DirectoryInfo.Data + "/download.png";
+                FilePayload payload = eventArgs.Payload as FilePayload;
+                try
+                {
+                    payload.SaveAsFile(path);
+                    helper.Done();
+                }
+                catch (Exception exception)
+                {
+                    Assert.Fail(string.Format("Exception occurred during SaveAsFile: {0}", exception.Message));
+                }
+            };
+
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                client.Connect(eventArgs.PeerInfo);
+            };
+
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                Assert.AreEqual(ConnectionStatus.OK, eventArgs.Result.Status);
+                helper.Done();
+            };
+
+            server.Listen();
+            client.TryDiscovery();
+            bool connected = await helper.WaitForEvent(60);
+            Assert.IsTrue(connected, "Connection not established");
+
+            client.SendPayloadAsync(_filePayload);
+            bool saved = await helper.WaitForEvent(60);
+            Assert.IsTrue(saved, "SaveAsFile not invoked or failed");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : FilePayload Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.FilePayload.PayloadType A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void PayloadType_PROPERTY_GET()
+        {
+            Assert.AreEqual(PayloadType.FilePayload, _filePayload.PayloadType, "Property \"PayloadType\" of FilePayload should be PayloadType.FilePayload");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : FilePayload Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.FilePayload.ReceivedBytes A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task ReceivedBytes_PROPERTY_GET()
+        {
+            string serviceName = "ReceivedBytes_PROPERTY_GET";
+            string displayName = "ReceivedBytes_PROPERTY_GET";
+
+            var server = new TestServer(serviceName, displayName);
+            var client = new TestClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+
+            server.ConnectionRequestEvent += (sender, e) =>
+            {
+                TestServer.ConnectionRequestEventArgs eventArgs = e as TestServer.ConnectionRequestEventArgs;
+                server.Accept(eventArgs.PeerInfo);
+            };
+
+            server.PayloadReceivedEvent += (sender, e) =>
+            {
+                TestServer.PayloadReceivedEventArgs eventArgs = e as TestServer.PayloadReceivedEventArgs;
+                if (eventArgs.Status != PayloadTransferStatus.Success)
+                    return;
+
+                FilePayload payload = eventArgs.Payload as FilePayload;
+                Assert.IsInstanceOf<UInt64>(payload.ReceivedBytes);
+                Assert.Greater(payload.ReceivedBytes, 0, "ReceivedBytes should be greater than 0.");
+                helper.Done();
+            };
+
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                client.Connect(eventArgs.PeerInfo);
+            };
+
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                Assert.AreEqual(ConnectionStatus.OK, eventArgs.Result.Status);
+                helper.Done();
+            };
+
+            server.Listen();
+            client.TryDiscovery();
+            bool connected = await helper.WaitForEvent(60);
+            Assert.IsTrue(connected, "Connection not established");
+
+            helper.Reset();
+            client.SendPayloadAsync(_filePayload);
+            bool received = await helper.WaitForEvent(60);
+            Assert.IsTrue(received, "File was not received");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : FilePayload Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.FilePayload.ReceivedFileName A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task ReceivedFileName_PROPERTY_GET()
+        {
+            string serviceName = "ReceivedBytes_PROPERTY_GET";
+            string displayName = "ReceivedBytes_PROPERTY_GET";
+
+            var server = new TestServer(serviceName, displayName);
+            var client = new TestClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+
+            server.ConnectionRequestEvent += (sender, e) =>
+            {
+                TestServer.ConnectionRequestEventArgs eventArgs = e as TestServer.ConnectionRequestEventArgs;
+                server.Accept(eventArgs.PeerInfo);
+            };
+
+            server.PayloadReceivedEvent += (sender, e) =>
+            {
+                TestServer.PayloadReceivedEventArgs eventArgs = e as TestServer.PayloadReceivedEventArgs;
+                if (eventArgs.Status != PayloadTransferStatus.Success)
+                    return;
+
+                FilePayload payload = eventArgs.Payload as FilePayload;
+                Assert.IsInstanceOf<string>(payload.ReceivedFileName);
+                Assert.AreEqual(_fileName, payload.ReceivedFileName, "Wrong ServiceName, Expected: ({0}), Actual: ({1})", _fileName, payload.ReceivedFileName);
+                helper.Done();
+            };
+
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                client.Connect(eventArgs.PeerInfo);
+            };
+
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                Assert.AreEqual(ConnectionStatus.OK, eventArgs.Result.Status);
+                helper.Done();
+            };
+
+            server.Listen();
+            client.TryDiscovery();
+            bool connected = await helper.WaitForEvent(60);
+            Assert.IsTrue(connected, "Connection not established");
+
+            helper.Reset();
+            client.SendPayloadAsync(_filePayload);
+            bool received = await helper.WaitForEvent(60);
+            Assert.IsTrue(received, "File was not received");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : FilePayload Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.FilePayload.TotalBytes A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task TotalBytes_PROPERTY_GET()
+        {
+            string serviceName = "TotalBytes_PROPERTY_GET";
+            string displayName = "TotalBytes_PROPERTY_GET";
+
+            var server = new TestServer(serviceName, displayName);
+            var client = new TestClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+
+            server.ConnectionRequestEvent += (sender, e) =>
+            {
+                TestServer.ConnectionRequestEventArgs eventArgs = e as TestServer.ConnectionRequestEventArgs;
+                server.Accept(eventArgs.PeerInfo);
+            };
+
+            server.PayloadReceivedEvent += (sender, e) =>
+            {
+                TestServer.PayloadReceivedEventArgs eventArgs = e as TestServer.PayloadReceivedEventArgs;
+                if (eventArgs.Status != PayloadTransferStatus.Success)
+                    return;
+
+                FilePayload payload = eventArgs.Payload as FilePayload;
+                Assert.IsInstanceOf<UInt64>(payload.TotalBytes);
+                Assert.Greater(payload.TotalBytes, 0, "TotalBytes should be greater than 0.");
+                helper.Done();
+            };
+
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                client.Connect(eventArgs.PeerInfo);
+            };
+
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                Assert.AreEqual(ConnectionStatus.OK, eventArgs.Result.Status);
+                helper.Done();
+            };
+
+            server.Listen();
+            client.TryDiscovery();
+            bool connected = await helper.WaitForEvent(60);
+            Assert.IsTrue(connected, "Connection not established");
+
+            helper.Reset();
+            client.SendPayloadAsync(_filePayload);
+            bool received = await helper.WaitForEvent(60);
+            Assert.IsTrue(received, "File was not received");
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSGroupBase.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSGroupBase.cs
new file mode 100755 (executable)
index 0000000..9f70a01
--- /dev/null
@@ -0,0 +1,327 @@
+/*
+ *  Copyright (c) 2021 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 System.Text;
+using System.Threading.Tasks;
+
+namespace Tizen.Applications.Cion.Tests
+{
+
+    [TestFixture]
+    [Description("Tizen.Applications.GroupBase Tests")]
+    public class GroupBaseTests
+    {
+        private SecurityInfo CreateSecurityInfo()
+        {
+            SecurityInfo securityInfo = new SecurityInfo();
+
+            string caPath = Application.Current.DirectoryInfo.SharedResource + "/rootCA/ca.pem";
+            string certPath = Application.Current.DirectoryInfo.SharedResource + "/server/test-server.pem";
+            string privateKeyPath = Application.Current.DirectoryInfo.SharedResource + "/server/test-server.key";
+
+            securityInfo.CaPath = caPath;
+            securityInfo.CertPath = certPath;
+            securityInfo.PrivateKeyPath = privateKeyPath;
+
+            return securityInfo;
+        }
+
+        [SetUp]
+        public void Init()
+        {
+        }
+
+        [TearDown]
+        public void Destroy()
+        {
+
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : GroupBase Constructor - Object should not be null after initializing")]
+        [Property("SPEC", "Tizen.Applications.Cion.GroupBase.GroupBase C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTR")]
+        [Property("COVPARAM", "string")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void GroupBase_INIT()
+        {
+            string topic = "GroupBase_INIT";
+            var group = new TestGroup(topic);
+            Assert.IsNotNull(group, "Object should not be null after initializing");
+            Assert.IsInstanceOf<GroupBase>(group, "group should be an instance of Tizen.Applications.Cion.GroupBase");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : GroupBase Constructor - Object should not be null after initializing")]
+        [Property("SPEC", "Tizen.Applications.Cion.GroupBase.GroupBase C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTR")]
+        [Property("COVPARAM", "string, SecurityInfo")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void GroupBase_INIT_WITH_SECURITY_INFO()
+        {
+            string topic = "GroupBase_INIT_WITH_SECURITY_INFO";
+            SecurityInfo securityInfo = CreateSecurityInfo();
+            var group = new TestGroup(topic, securityInfo);
+            Assert.IsNotNull(group, "Object should not be null after initializing");
+            Assert.IsInstanceOf<GroupBase>(group, "group should be an instance of Tizen.Applications.Cion.GroupBase");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks if Topic property return correct value")]
+        [Property("SPEC", "Tizen.Applications.Cion.GroupBase.Topic A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void Topic_READ_ONLY()
+        {
+            string topic = "Topic_READ_ONLY";
+            var group = new TestGroup(topic);
+
+            Assert.IsInstanceOf<string>(group.Topic, "Topic should be of type string");
+            Assert.IsTrue(group.Topic == topic, string.Format("Wrong Topic, Expected: ({0}), Actual: ({1})", topic, group.Topic));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of GroupBase.Subscribe")]
+        [Property("SPEC", "Tizen.Applications.Cion.GroupBase.Subscribe M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task Subscribe_CHECK_RESULT()
+        {
+            string topic = "Subscribe_CHECK_RESULT";
+            var group = new TestGroup(topic);
+            var group2 = new TestGroup(topic);
+            WaitHelper helper = new WaitHelper();
+
+            group.JoinedEvent += (sender, eventArgs) =>
+            {
+                helper.Done();
+            };
+            group.Subscribe();
+            group2.Subscribe();
+
+            bool joined = await helper.WaitForEvent(60);
+
+            Assert.IsTrue(joined, string.Format("TIMEOUT: Failed to subscribe test topic {0}", topic));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of GroupBase.Unsubscribe")]
+        [Property("SPEC", "Tizen.Applications.Cion.GroupBase.Unsubscribe M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task Unsubscribe_CHECK_RESULT()
+        {
+            string topic = "Unsubscribe_CHECK_RESULT";
+            var group = new TestGroup(topic);
+            var group2 = new TestGroup(topic);
+            WaitHelper helper = new WaitHelper();
+
+            group.JoinedEvent += (sender, eventArgs) =>
+            {
+                helper.Done();
+            };
+
+            group.LeftEvent += (sender, eventArgs) =>
+            {
+                helper.Done();
+            };
+            group.Subscribe();
+            group2.Subscribe();
+
+            bool joined = await helper.WaitForEvent(60);
+
+            Assert.IsTrue(joined, string.Format("TIMEOUT: Failed to subscribe test topic {0}", topic));
+            helper.Reset();
+
+            group2.Unsubscribe();
+
+            bool left = await helper.WaitForEvent(60);
+            Assert.IsTrue(joined, string.Format("TIMEOUT: Failed to unsubscribe test topic {0}", topic));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of GroupBase.Publish")]
+        [Property("SPEC", "Tizen.Applications.Cion.GroupBase.Publish M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task Publish_CHECK_RESULT()
+        {
+            string topic = "Publish_CHECK_RESULT";
+            var group = new TestGroup(topic);
+            var group2 = new TestGroup(topic);
+            WaitHelper helper = new WaitHelper();
+
+            group.JoinedEvent += (sender, eventArgs) =>
+            {
+                helper.Done();
+            };
+
+            group.PayloadReceivedEvent += (sender, eventArgs) =>
+            {
+                helper.Done();
+            };
+
+            group.Subscribe();
+            group2.Subscribe();
+
+            bool joined = await helper.WaitForEvent(60);
+
+            Assert.IsTrue(joined, string.Format("TIMEOUT: Failed to subscribe test topic {0}", topic));
+            helper.Reset();
+
+            string testData = "Publish_CHECK_RESULT";
+            DataPayload payload = new DataPayload(Encoding.UTF8.GetBytes(testData));
+            group2.Publish(payload);
+
+            bool received = await helper.WaitForEvent(60);
+            Assert.IsTrue(received, "Data was not received");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the callback GroupBase.OnJoined invoked")]
+        [Property("SPEC", "Tizen.Applications.Cion.GroupBase.OnJoined M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task OnJoined_CHECK_CB()
+        {
+            string topic = "OnJoined_CHECK_CB";
+            var group = new TestGroup(topic);
+            var group2 = new TestGroup(topic);
+            WaitHelper helper = new WaitHelper();
+
+            group.JoinedEvent += (sender, eventArgs) =>
+            {
+                helper.Done();
+            };
+
+            group.Subscribe();
+            group2.Subscribe();
+
+            bool joined = await helper.WaitForEvent(60);
+            Assert.IsTrue(joined, string.Format("TIMEOUT: Failed to subscribe test topic {0}", topic));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the callback GroupBase.OnLeft invoked")]
+        [Property("SPEC", "Tizen.Applications.Cion.GroupBase.OnLeft M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task OnLeft_CHECK_CB()
+        {
+            string topic = "OnLeft_CHECK_CB";
+            var group = new TestGroup(topic);
+            var group2 = new TestGroup(topic);
+            WaitHelper helper = new WaitHelper();
+
+            group.JoinedEvent += (sender, eventArgs) =>
+            {
+                helper.Done();
+            };
+
+            group.Subscribe();
+            group2.Subscribe();
+
+            bool joined = await helper.WaitForEvent(60);
+            Assert.IsTrue(joined, string.Format("TIMEOUT: Failed to subscribe test topic {0}", topic));
+
+            helper.Reset();
+            group.LeftEvent += (sender, eventArgs) =>
+            {
+                helper.Done();
+            };
+
+            group2.Unsubscribe();
+            bool left = await helper.WaitForEvent(60);
+            Assert.IsTrue(left, string.Format("TIMEOUT: Failed to unsubscribe test topic {0}", topic));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the callback GroupBase.OnPayloadReceived invoked")]
+        [Property("SPEC", "Tizen.Applications.Cion.GroupBase.OnPayloadReceived M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task OnPayloadReceived_CHECK_CB()
+        {
+            string topic = "OnJoined_CHECK_CB";
+            var group = new TestGroup(topic);
+            var group2 = new TestGroup(topic);
+            WaitHelper helper = new WaitHelper();
+
+            group.JoinedEvent += (sender, eventArgs) =>
+            {
+                helper.Done();
+            };
+
+            group.Subscribe();
+            group2.Subscribe();
+
+            bool joined = await helper.WaitForEvent(60);
+            Assert.IsTrue(joined, string.Format("TIMEOUT: Failed to subscribe test topic {0}", topic));
+
+            helper.Reset();
+
+            group.PayloadReceivedEvent += (sender, eventArgs) =>
+            {
+                helper.Done();
+            };
+
+            group2.Publish(new DataPayload(Encoding.UTF8.GetBytes("TEST")));
+            bool received = await helper.WaitForEvent(60);
+            Assert.IsTrue(received, "Data was not received");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of GroupBase.Dispose")]
+        [Property("SPEC", "Tizen.Applications.Cion.GroupBase.Dispose M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void Dispose_CHECK_RESULT()
+        {
+            string topic = "Dispose_CHECK_RESULT";
+            var group = new TestGroup(topic);
+
+            try
+            {
+                group.Dispose();
+            }
+            catch
+            {
+                Assert.Fail("Exception occurred while invoking Dispose().");
+            }
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSPayload.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSPayload.cs
new file mode 100644 (file)
index 0000000..e339dca
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ *  Copyright (c) 2021 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 System.Text;
+
+namespace Tizen.Applications.Cion.Tests
+{
+    [TestFixture]
+    [Description("Tizen.Applications.Cion.Payload Tests")]
+    public class PayloadTests
+    {
+        private static Payload[] _payloads;
+        private readonly string _fileName = "Tizen.Applications.Cion.Tests.png";
+        private readonly string _dataString = "Test Data";
+
+        [SetUp]
+        public void Init()
+        {
+            _payloads = new Payload[]
+            {
+                new FilePayload(_fileName),
+                new DataPayload(Encoding.UTF8.GetBytes(_dataString)),
+            };
+        }
+
+        [TearDown]
+        public void Destroy()
+        {
+            _payloads = null;
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : Payload Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.Payload.Id A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void Id_PROPERTY_GET()
+        {
+            Assert.IsInstanceOf<string>(_payloads[0].Id);
+            Assert.IsInstanceOf<string>(_payloads[1].Id);
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : Payload Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.Payload.PayloadType A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void PayloadType_PROPERTY_GET()
+        {
+            Assert.AreEqual(PayloadType.FilePayload, _payloads[0].PayloadType);
+            Assert.AreEqual(PayloadType.DataPayload, _payloads[1].PayloadType);
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSPayloadAsyncResult.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSPayloadAsyncResult.cs
new file mode 100644 (file)
index 0000000..99cb57e
--- /dev/null
@@ -0,0 +1,232 @@
+/*
+ *  Copyright (c) 2021 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 System.Text;
+using System.Threading.Tasks;
+
+namespace Tizen.Applications.Cion.Tests
+{
+    [TestFixture]
+    [Description("Tizen.Applications.Cion.PayloadAsyncResult Tests")]
+    public class PayloadAsyncResultTests
+    {
+        private DataPayload _dataPayload;
+
+        [SetUp]
+        public void Init()
+        {
+            string data = "PayloadAsyncResultTests";
+            _dataPayload = new DataPayload(Encoding.UTF8.GetBytes(data));
+        }
+
+        [TearDown]
+        public void Destroy()
+        {
+            _dataPayload = null;
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : PayloadAsyncResult Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.PayloadAsyncResult.PayloadId A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task PayloadId_PROPERTY_GET()
+        {
+            string serviceName = "PayloadId_PROPERTY_GET";
+            string displayName = "PayloadId_PROPERTY_GET";
+
+            var server = new TestServer(serviceName, displayName);
+            var client = new TestClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+
+            server.ConnectionRequestEvent += (sender, e) =>
+            {
+                TestServer.ConnectionRequestEventArgs eventArgs = e as TestServer.ConnectionRequestEventArgs;
+                server.Accept(eventArgs.PeerInfo);
+            };
+
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                client.Connect(eventArgs.PeerInfo);
+            };
+
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                Assert.AreEqual(ConnectionStatus.OK, eventArgs.Result.Status);
+                helper.Done();
+            };
+
+            server.Listen();
+            client.TryDiscovery();
+            bool connected = await helper.WaitForEvent(60);
+
+            Assert.IsTrue(connected, "Connection not established");
+
+            PayloadAsyncResult result = await client.SendPayloadAsync(_dataPayload);
+            Assert.IsInstanceOf<string>(result.PayloadId, "PayloadId should be string");
+            Assert.IsNotNull(result.PayloadId, "PayloadId should not be null");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : PayloadAsyncResult Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.PayloadAsyncResult.PeerInfo A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task PeerInfo_PROPERTY_GET()
+        {
+            string serviceName = "PeerInfo_PROPERTY_GET";
+            string displayName = "PeerInfo_PROPERTY_GET";
+
+            var server = new TestServer(serviceName, displayName);
+            var client = new TestClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+
+            server.ConnectionRequestEvent += (sender, e) =>
+            {
+                TestServer.ConnectionRequestEventArgs eventArgs = e as TestServer.ConnectionRequestEventArgs;
+                server.Accept(eventArgs.PeerInfo);
+            };
+
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                client.Connect(eventArgs.PeerInfo);
+            };
+
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                Assert.AreEqual(ConnectionStatus.OK, eventArgs.Result.Status);
+                helper.Done();
+            };
+
+            server.Listen();
+            client.TryDiscovery();
+            bool connected = await helper.WaitForEvent(60);
+
+            Assert.IsTrue(connected, "Connection not established");
+
+            PayloadAsyncResult result = await client.SendPayloadAsync(_dataPayload);
+            Assert.IsInstanceOf<PeerInfo>(result.PeerInfo, "PeerInfo should be PeerInfo");
+            Assert.IsNotNull(result.PeerInfo, "PeerInfo should not be null");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : PayloadAsyncResult Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.PayloadAsyncResult.Result A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task Result_PROPERTY_GET()
+        {
+            string serviceName = "Result_PROPERTY_GET";
+            string displayName = "Result_PROPERTY_GET";
+
+            var server = new TestServer(serviceName, displayName);
+            var client = new TestClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+
+            server.ConnectionRequestEvent += (sender, e) =>
+            {
+                TestServer.ConnectionRequestEventArgs eventArgs = e as TestServer.ConnectionRequestEventArgs;
+                server.Accept(eventArgs.PeerInfo);
+            };
+
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                client.Connect(eventArgs.PeerInfo);
+            };
+
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                Assert.AreEqual(ConnectionStatus.OK, eventArgs.Result.Status);
+                helper.Done();
+            };
+
+            server.Listen();
+            client.TryDiscovery();
+            bool connected = await helper.WaitForEvent(60);
+
+            Assert.IsTrue(connected, "Connection not established");
+
+            PayloadAsyncResult result = await client.SendPayloadAsync(_dataPayload);
+            Assert.IsInstanceOf<PayloadAsyncResultCode>(result.Result, "Result should be PayloadAsyncResultCode");
+            Assert.AreEqual(PayloadAsyncResultCode.Success, result.Result, "Result code is not PayloadAsyncResultCode.Success");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of PayloadAsyncResult.Dispose")]
+        [Property("SPEC", "Tizen.Applications.Cion.PayloadAsyncResult.Dispose M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task Dispose_CHECK_RESULT()
+        {
+            string serviceName = "Dispose_CHECK_RESULT";
+            string displayName = "Dispose_CHECK_RESULT";
+
+            var server = new TestServer(serviceName, displayName);
+            var client = new TestClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+
+            server.ConnectionRequestEvent += (sender, e) =>
+            {
+                TestServer.ConnectionRequestEventArgs eventArgs = e as TestServer.ConnectionRequestEventArgs;
+                server.Accept(eventArgs.PeerInfo);
+            };
+
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                client.Connect(eventArgs.PeerInfo);
+            };
+
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                Assert.AreEqual(ConnectionStatus.OK, eventArgs.Result.Status);
+                helper.Done();
+            };
+
+            server.Listen();
+            client.TryDiscovery();
+            bool connected = await helper.WaitForEvent(60);
+
+            Assert.IsTrue(connected, "Connection not established");
+
+            PayloadAsyncResult result = await client.SendPayloadAsync(_dataPayload);
+            try
+            {
+                result.Dispose();
+            }
+            catch
+            {
+                Assert.Fail("Exception occurred while invoking Dispose().");
+            }
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSPeerInfo.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSPeerInfo.cs
new file mode 100644 (file)
index 0000000..0873210
--- /dev/null
@@ -0,0 +1,316 @@
+/*
+ *  Copyright (c) 2021 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 System.Threading.Tasks;
+
+namespace Tizen.Applications.Cion.Tests
+{
+    [TestFixture]
+    [Description("Tizen.Applications.Cion.PeerInfo Tests")]
+    public class PeerInfoTests
+    {
+        [SetUp]
+        public void Init()
+        {
+        }
+
+        [TearDown]
+        public void Destroy()
+        {
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : PeerInfo Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.PeerInfo.AppId A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task AppId_PROPERTY_GET()
+        {
+            string serviceName = "AppId_PROPERTY_GET";
+            string displayName = "AppId_PROPERTY_GET";
+            var server = new TestServer(serviceName, displayName);
+            var client = new TestClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                Assert.IsInstanceOf<string>(eventArgs.PeerInfo.AppId, "AppId should be of type string");
+                Assert.IsNotNull(eventArgs.PeerInfo.AppId, "AppId should not be null");
+                helper.Done();
+            };
+
+            server.Listen();
+            client.TryDiscovery();
+
+            bool discovered = await helper.WaitForEvent(60);
+            Assert.IsTrue(discovered, "Discovered event not occurred");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : PeerInfo Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.PeerInfo.AppVersion A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task AppVersion_PROPERTY_GET()
+        {
+            string serviceName = "AppVersion_PROPERTY_GET";
+            string displayName = "AppVersion_PROPERTY_GET";
+            var server = new TestServer(serviceName, displayName);
+            var client = new TestClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                Assert.IsInstanceOf<string>(eventArgs.PeerInfo.AppVersion, "AppVersion should be of type string");
+                Assert.IsNotNull(eventArgs.PeerInfo.AppVersion, "AppVersion should not be null");
+                Assert.AreEqual("1.0.0", eventArgs.PeerInfo.AppVersion);
+                helper.Done();
+            };
+
+            server.Listen();
+            client.TryDiscovery();
+
+            bool discovered = await helper.WaitForEvent(60);
+            Assert.IsTrue(discovered, "Discovered event not occurred");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : PeerInfo Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.PeerInfo.DeviceId A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task DeviceId_PROPERTY_GET()
+        {
+            string serviceName = "DeviceId_PROPERTY_GET";
+            string displayName = "DeviceId_PROPERTY_GET";
+            var server = new TestServer(serviceName, displayName);
+            var client = new TestClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                Assert.IsInstanceOf<string>(eventArgs.PeerInfo.DeviceId, "DeviceId should be of type string");
+                Assert.IsNotNull(eventArgs.PeerInfo.DeviceId, "DeviceId should not be null");
+                helper.Done();
+            };
+
+            server.Listen();
+            client.TryDiscovery();
+
+            bool discovered = await helper.WaitForEvent(60);
+            Assert.IsTrue(discovered, "Discovered event not occurred");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : PeerInfo Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.PeerInfo.DeviceName A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task DeviceName_PROPERTY_GET()
+        {
+            string serviceName = "DeviceName_PROPERTY_GET";
+            string displayName = "DeviceName_PROPERTY_GET";
+            var server = new TestServer(serviceName, displayName);
+            var client = new TestClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                Assert.IsInstanceOf<string>(eventArgs.PeerInfo.DeviceName, "DeviceName should be of type string");
+                Assert.IsNotNull(eventArgs.PeerInfo.DeviceName, "DeviceName should not be null");
+                helper.Done();
+            };
+
+            server.Listen();
+            client.TryDiscovery();
+
+            bool discovered = await helper.WaitForEvent(60);
+            Assert.IsTrue(discovered, "Discovered event not occurred");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : PeerInfo Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.PeerInfo.DevicePlatform A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task DevicePlatform_PROPERTY_GET()
+        {
+            string serviceName = "DevicePlatform_PROPERTY_GET";
+            string displayName = "DevicePlatform_PROPERTY_GET";
+            var server = new TestServer(serviceName, displayName);
+            var client = new TestClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                Assert.IsInstanceOf<string>(eventArgs.PeerInfo.DevicePlatform, "DevicePlatform should be of type string");
+                Assert.IsNotNull(eventArgs.PeerInfo.DevicePlatform, "DevicePlatform should not be null");
+                helper.Done();
+            };
+
+            server.Listen();
+            client.TryDiscovery();
+
+            bool discovered = await helper.WaitForEvent(60);
+            Assert.IsTrue(discovered, "Discovered event not occurred");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : PeerInfo Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.PeerInfo.DevicePlatformVersion A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task DevicePlatformVersion_PROPERTY_GET()
+        {
+            string serviceName = "DevicePlatformVersion_PROPERTY_GET";
+            string displayName = "DevicePlatformVersion_PROPERTY_GET";
+            var server = new TestServer(serviceName, displayName);
+            var client = new TestClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                Assert.IsInstanceOf<string>(eventArgs.PeerInfo.DevicePlatformVersion, "DevicePlatform should be of type string");
+                Assert.IsNotNull(eventArgs.PeerInfo.DevicePlatformVersion, "DevicePlatform should not be null");
+                helper.Done();
+            };
+
+            server.Listen();
+            client.TryDiscovery();
+
+            bool discovered = await helper.WaitForEvent(60);
+            Assert.IsTrue(discovered, "Discovered event not occurred");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : PeerInfo Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.PeerInfo.DeviceType A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task DeviceType_PROPERTY_GET()
+        {
+            string serviceName = "DeviceType_PROPERTY_GET";
+            string displayName = "DeviceType_PROPERTY_GET";
+            var server = new TestServer(serviceName, displayName);
+            var client = new TestClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                Assert.IsInstanceOf<string>(eventArgs.PeerInfo.DeviceType, "DeviceType should be of type string");
+                Assert.IsNotNull(eventArgs.PeerInfo.DeviceType, "DeviceType should not be null");
+                helper.Done();
+            };
+
+            server.Listen();
+            client.TryDiscovery();
+
+            bool discovered = await helper.WaitForEvent(60);
+            Assert.IsTrue(discovered, "Discovered event not occurred");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : PeerInfo Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.PeerInfo.UUID A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task UUID_PROPERTY_GET()
+        {
+            string serviceName = "UUID_PROPERTY_GET";
+            string displayName = "UUID_PROPERTY_GET";
+            var server = new TestServer(serviceName, displayName);
+            var client = new TestClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                Assert.IsInstanceOf<string>(eventArgs.PeerInfo.UUID, "UUID should be of type string");
+                Assert.IsNotNull(eventArgs.PeerInfo.UUID, "UUID should not be null");
+                helper.Done();
+            };
+
+            server.Listen();
+            client.TryDiscovery();
+
+            bool discovered = await helper.WaitForEvent(60);
+            Assert.IsTrue(discovered, "Discovered event not occurred");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of PeerInfo.Dispose")]
+        [Property("SPEC", "Tizen.Applications.Cion.PeerInfo.Dispose M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task Dispose_CHECK_RESULT()
+        {
+            string serviceName = "Dispose_CHECK_RESULT";
+            string displayName = "Dispose_CHECK_RESULT";
+            var server = new TestServer(serviceName, displayName);
+            var client = new TestClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+
+            client.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                Assert.IsInstanceOf<string>(eventArgs.PeerInfo.UUID, "UUID should be of type string");
+                Assert.IsNotNull(eventArgs.PeerInfo.UUID, "UUID should not be null");
+                var peerInfo = eventArgs.PeerInfo;
+                try
+                {
+                    peerInfo.Dispose();
+                }
+                catch
+                {
+                    Assert.Fail("Exception occurred while invoking Dispose().");
+                }
+                helper.Done();
+            };
+
+            server.Listen();
+            client.TryDiscovery();
+
+            bool discovered = await helper.WaitForEvent(60);
+            Assert.IsTrue(discovered, "Discovered event not occurred");
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSSecurityInfo.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSSecurityInfo.cs
new file mode 100644 (file)
index 0000000..89f4a09
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ *  Copyright (c) 2021 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;
+
+namespace Tizen.Applications.Cion.Tests
+{
+    [TestFixture]
+    [Description("Tizen.Applications.Cion.SecurityInfo Tests")]
+    public class SecurityInfoTests
+    {
+        private SecurityInfo _securityInfo;
+
+        [SetUp]
+        public void Init()
+        {
+            _securityInfo = new SecurityInfo();
+        }
+
+        [TearDown]
+        public void Destroy()
+        {
+            _securityInfo = null;
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : SecurityInfo Constructor - Object should not be null after initializing")]
+        [Property("SPEC", "Tizen.Applications.Cion.SecurityInfo.SecurityInfo C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTR")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void SecurityInfo_INIT()
+        {
+            var securityInfo = new SecurityInfo();
+            Assert.IsNotNull(securityInfo, "Object should not be null after initializing");
+            Assert.IsInstanceOf<SecurityInfo>(securityInfo, "securityInfo should be an instance of Tizen.Applications.Cion.SecurityInfo");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : SecurityInfo Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.SecurityInfo.CaPath A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRW")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void CaPath_PROPERTY_SET_GET()
+        {
+            string path = Application.Current.DirectoryInfo.SharedResource + "/rootCA/ca.pem";
+
+            _securityInfo.CaPath = path;
+            Assert.IsInstanceOf<string>(_securityInfo.CaPath);
+            Assert.AreEqual(path, _securityInfo.CaPath, "Property \"CaPath\": the set value and the get value should be equal");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : SecurityInfo Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.SecurityInfo.CertPath A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRW")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void CertPath_PROPERTY_SET_GET()
+        {
+            string path = Application.Current.DirectoryInfo.SharedResource + "/server/test-server.pem";
+
+            _securityInfo.CertPath = path;
+            Assert.IsInstanceOf<string>(_securityInfo.CertPath);
+            Assert.AreEqual(path, _securityInfo.CertPath, "Property \"CertPath\": the set value and the get value should be equal");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : SecurityInfo Properties")]
+        [Property("SPEC", "Tizen.Applications.Cion.SecurityInfo.PrivateKeyPath A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRW")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void PrivateKeyPath_PROPERTY_SET_GET()
+        {
+            string path = Application.Current.DirectoryInfo.SharedResource + "/server/test-server.key";
+
+            _securityInfo.PrivateKeyPath = path;
+            Assert.IsInstanceOf<string>(_securityInfo.PrivateKeyPath);
+            Assert.AreEqual(path, _securityInfo.PrivateKeyPath, "Property \"CaPath\": the set value and the get value should be equal");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of SecurityInfo.Dispose")]
+        [Property("SPEC", "Tizen.Applications.Cion.SecurityInfo.Dispose M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void Dispose_CHECK_RESULT()
+        {
+            var securityInfo = new SecurityInfo();
+
+            try
+            {
+                securityInfo.Dispose();
+            }
+            catch
+            {
+                Assert.Fail("Exception occurred while invoking Dispose().");
+            }
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSServerBase.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSServerBase.cs
new file mode 100755 (executable)
index 0000000..357a05a
--- /dev/null
@@ -0,0 +1,800 @@
+/*
+ *  Copyright (c) 2021 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 System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tizen.Applications.Cion.Tests
+{
+
+    [TestFixture]
+    [Description("Tizen.Applications.Cion.ServerBase Tests")]
+    public class ServerBaseTests
+    {
+        private TestClient SetupClient(string serviceName)
+        {
+            TestClient _testClient = new TestClient(serviceName);
+            _testClient.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                _testClient.Connect(eventArgs.PeerInfo);
+            };
+            _testClient.TryDiscovery();
+            return _testClient;
+        }
+
+        private SecurityInfo CreateSecurityInfo()
+        {
+            SecurityInfo securityInfo = new SecurityInfo();
+
+            string caPath = Application.Current.DirectoryInfo.SharedResource + "/rootCA/ca.pem";
+            string certPath = Application.Current.DirectoryInfo.SharedResource + "/server/test-server.pem";
+            string privateKeyPath = Application.Current.DirectoryInfo.SharedResource + "/server/test-server.key";
+
+            securityInfo.CaPath = caPath;
+            securityInfo.CertPath = certPath;
+            securityInfo.PrivateKeyPath = privateKeyPath;
+
+            return securityInfo;
+        }
+
+        [SetUp]
+        public void Init()
+        {
+        }
+
+        [TearDown]
+        public void Destroy()
+        {
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : ServerBase Constructor - Object should not be null after initializing")]
+        [Property("SPEC", "Tizen.Applications.Cion.ServerBase.ServerBase C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTR")]
+        [Property("COVPARAM", "string, string")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void ServerBase_INIT()
+        {
+            string serviceName = "ServerBase_INIT";
+            string displayName = "ServerBase_INIT";
+            var server = new TestServer(serviceName, displayName);
+            Assert.IsNotNull(server, "Object should not be null after initializing");
+            Assert.IsInstanceOf<ServerBase>(server, "server should be an instance of Tizen.Applications.Cion.ServerBase");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test : ServerBase Constructor - Object should not be null after initializing")]
+        [Property("SPEC", "Tizen.Applications.Cion.ServerBase.ServerBase C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTR")]
+        [Property("COVPARAM", "string, string, SecurityInfo")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void ServerBase_INIT_WITH_SECURITY_INFO()
+        {
+            string serviceName = "ServerBase_INIT_WITH_SECURITY_INFO";
+            string displayName = "ServerBase_INIT_WITH_SECURITY_INFO";
+            SecurityInfo securityInfo = CreateSecurityInfo();
+            var server = new TestServer(serviceName, displayName,securityInfo);
+            Assert.IsNotNull(server, "Object should not be null after initializing");
+            Assert.IsInstanceOf<ServerBase>(server, "server should be an instance of Tizen.Applications.Cion.ServerBase");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks if ServiceName property return correct value")]
+        [Property("SPEC", "Tizen.Applications.Cion.ServerBase.ServiceName A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void ServiceName_READ_ONLY()
+        {
+            string serviceName = "ServerServiceName";
+            var server = new TestServer(serviceName, serviceName);
+
+            Assert.IsInstanceOf<string>(server.ServiceName, "ServiceName should be of type string");
+            Assert.IsTrue(server.ServiceName == serviceName, string.Format("Wrong ServiceName, Expected: ({0}), Actual: ({1})", serviceName, server.ServiceName));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks if DisplayName property return correct value")]
+        [Property("SPEC", "Tizen.Applications.Cion.ServerBase.DisplayName A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void DisplayName_READ_ONLY()
+        {
+            string serviceName = "ServerDisplayName";
+            var server = new TestServer(serviceName, serviceName);
+
+            Assert.IsInstanceOf<string>(server.DisplayName, "ServiceName should be of type string");
+            Assert.IsTrue(server.DisplayName == serviceName, string.Format("Wrong DisplayName, Expected: ({0}), Actual: ({1})", serviceName, server.DisplayName));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of ServerBase.Listen")]
+        [Property("SPEC", "Tizen.Applications.Cion.ServerBase.Listen M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void Listen_CHECK_RESULT()
+        {
+            string serviceName = "Listen_CHECK_RESULT";
+            var server = new TestServer(serviceName, serviceName);
+
+            try
+            {
+                server.Listen();
+            }
+            catch (Exception e)
+            {
+                Assert.Fail(string.Format("Exception occurred at Listen(): ", e.Message));
+            }
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of ServerBase.Stop")]
+        [Property("SPEC", "Tizen.Applications.Cion.ServerBase.Stop M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void Stop_CHECK_RESULT()
+        {
+            string serviceName = "Stop_CHECK_RESULT";
+            var server = new TestServer(serviceName, serviceName);
+
+            try
+            {
+                server.Listen();
+            }
+            catch (Exception e)
+            {
+                Assert.Fail(string.Format("Exception occurred at Listen(): ", e.Message));
+            }
+
+            try
+            {
+                server.Stop();
+            }
+            catch (Exception e)
+            {
+                Assert.Fail(string.Format("Exception occurred at Stop(): ", e.Message));
+            }
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of ServerBase.Disconnect")]
+        [Property("SPEC", "Tizen.Applications.Cion.ServerBase.Disconnect M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task Disconnect_CHECK_RESULT()
+        {
+            string serviceName = "Disconnect_CHECK_RESULT";
+            var client = SetupClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+            WaitHelper helper2 = new WaitHelper();
+            var server = new TestServer(serviceName, serviceName);
+            PeerInfo peer = null;
+            server.ConnectionRequestEvent += (sender, e) =>
+            {
+                Log.Error("CION", "Test client connection requested!!");
+                TestServer.ConnectionRequestEventArgs eventArgs = e as TestServer.ConnectionRequestEventArgs;
+                server.Accept(eventArgs.PeerInfo);
+                peer = eventArgs.PeerInfo;
+            };
+
+            server.ConnectionResultEvent += (sender, e) =>
+            {
+                TestServer.ConnectionResultEventArgs eventArgs = e as TestServer.ConnectionResultEventArgs;
+                if (eventArgs.Result.Status != ConnectionStatus.OK)
+                    Assert.Fail("Failed to connect with client");
+                helper.Done();
+            };
+
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                if (eventArgs.Result.Status != ConnectionStatus.OK)
+                    Assert.Fail("Failed to connect with client");
+                helper2.Done();
+            };
+
+            client.DisconnectedEvent += (sender, e) =>
+            {
+                Log.Error("CION", "Test client connection disconnected");
+                TestClient.DisconnectedEventArgs eventArgs = e as TestClient.DisconnectedEventArgs;
+                helper.Done();
+            };
+
+            try
+            {
+                server.Listen();
+            }
+            catch (Exception e)
+            {
+                Assert.Fail(string.Format("Exception occurred at Listen(): ", e.Message));
+            }
+
+            // wait until server and client get connected event
+            bool connected = await helper.WaitForEvent(60);
+            Assert.IsTrue(connected, string.Format("TIMEOUT: Failed to connect with test service {0}", serviceName));
+            helper.Reset();
+            connected = await helper2.WaitForEvent(60);
+            Assert.IsTrue(connected, string.Format("TIMEOUT: Failed to connect with test service {0}", serviceName));
+            helper2.Reset();
+
+            WaitHelper test = new WaitHelper();
+            await test.WaitForEvent(60);
+
+            server.Disconnect(peer);
+            bool disconnected = await helper.WaitForEvent(60);
+            Assert.IsTrue(disconnected, string.Format("TIMEOUT: Failed to disconnect with test service {0}", serviceName));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of ServerBase.SendPayloadAsync")]
+        [Property("SPEC", "Tizen.Applications.Cion.ServerBase.SendPayloadAsync M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("COVPARAM", "Payload")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task SendPayloadAsync_CHECK_RESULT()
+        {
+            string serviceName = "SendPayloadAsync_CHECK_RESULT";
+            var client = SetupClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+            var server = new TestServer(serviceName, serviceName);
+            server.ConnectionRequestEvent += (sender, e) =>
+            {
+                TestServer.ConnectionRequestEventArgs eventArgs = e as TestServer.ConnectionRequestEventArgs;
+                server.Accept(eventArgs.PeerInfo);
+            };
+
+            server.ConnectionResultEvent += (sender, e) =>
+            {
+                TestServer.ConnectionResultEventArgs eventArgs = e as TestServer.ConnectionResultEventArgs;
+                if (eventArgs.Result.Status != ConnectionStatus.OK)
+                    Assert.Fail("Failed to connect with client");
+                helper.Done();
+            };
+
+            try
+            {
+                server.Listen();
+            }
+            catch (Exception e)
+            {
+                Assert.Fail(string.Format("Exception occurred at Listen(): ", e.Message));
+            }
+
+            bool connected = await helper.WaitForEvent(60);
+            Assert.IsTrue(connected, string.Format("TIMEOUT: Failed to connect test service {0}", serviceName));
+
+            DataPayload dataPayload = new DataPayload(Encoding.UTF8.GetBytes(TestServer.HelloMessage));
+            try
+            {
+                server.SendPayloadAsync(dataPayload);
+            }
+            catch (Exception exception)
+            {
+                Assert.Fail("Exception occurred: {0}", exception.Message);
+            }
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of ServerBase.SendPayloadAsync")]
+        [Property("SPEC", "Tizen.Applications.Cion.ServerBase.SendPayloadAsync M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("COVPARAM", "Payload, PeerInfo")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task SendPayloadAsync_WITH_PEERINFO_CHECK_RESULT()
+        {
+            string serviceName = "SendPayloadAsync_WITH_PEERINFO_CHECK_RESULT";
+            var client = SetupClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+            var server = new TestServer(serviceName, serviceName);
+            PeerInfo peer = null;
+            server.ConnectionRequestEvent += (sender, e) =>
+            {
+                TestServer.ConnectionRequestEventArgs eventArgs = e as TestServer.ConnectionRequestEventArgs;
+                server.Accept(eventArgs.PeerInfo);
+                peer = eventArgs.PeerInfo;
+            };
+
+            server.ConnectionResultEvent += (sender, e) =>
+            {
+                TestServer.ConnectionResultEventArgs eventArgs = e as TestServer.ConnectionResultEventArgs;
+                if (eventArgs.Result.Status != ConnectionStatus.OK)
+                    Assert.Fail("Failed to connect with client");
+                helper.Done();
+            };
+
+            try
+            {
+                server.Listen();
+            }
+            catch (Exception e)
+            {
+                Assert.Fail(string.Format("Exception occurred at Listen(): ", e.Message));
+            }
+
+            bool connected = await helper.WaitForEvent(60);
+            Assert.IsTrue(connected, string.Format("TIMEOUT: Failed to connect test service {0}", serviceName));
+
+            DataPayload dataPayload = new DataPayload(Encoding.UTF8.GetBytes(TestServer.HelloMessage));
+            PayloadAsyncResult result = await server.SendPayloadAsync(dataPayload, peer);
+
+            Assert.IsNotNull(result);
+            Assert.AreEqual(result.Result, PayloadAsyncResultCode.Success);
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of ServerBase.Accept")]
+        [Property("SPEC", "Tizen.Applications.Cion.ServerBase.Accept M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task Accept_CHECK_RESULT()
+        {
+            string serviceName = "Accept_CHECK_RESULT";
+            var client = SetupClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+            var server = new TestServer(serviceName, serviceName);
+            PeerInfo peer = null;
+            server.ConnectionRequestEvent += (sender, e) =>
+            {
+                TestServer.ConnectionRequestEventArgs eventArgs = e as TestServer.ConnectionRequestEventArgs;
+                server.Accept(eventArgs.PeerInfo);
+                peer = eventArgs.PeerInfo;
+            };
+
+            server.ConnectionResultEvent += (sender, e) =>
+            {
+                TestServer.ConnectionResultEventArgs eventArgs = e as TestServer.ConnectionResultEventArgs;
+                if (eventArgs.Result.Status != ConnectionStatus.OK)
+                    Assert.Fail("Failed to connect with client");
+                helper.Done();
+            };
+            try
+            {
+                server.Listen();
+            }
+            catch (Exception e)
+            {
+                Assert.Fail(string.Format("Exception occurred at Listen(): ", e.Message));
+            }
+
+            bool accepted = await helper.WaitForEvent(60);
+            Assert.IsTrue(accepted, string.Format("TIMEOUT: Failed to connect test service {0}", serviceName));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of ServerBase.Reject")]
+        [Property("SPEC", "Tizen.Applications.Cion.ServerBase.Reject M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task Reject_CHECK_RESULT()
+        {
+            string serviceName = "Reject_CHECK_RESULT";
+            var client = SetupClient(serviceName);
+            WaitHelper helper = new WaitHelper();
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                if (eventArgs.Result.Status == ConnectionStatus.Rejected)
+                {
+                    helper.Done();
+                }
+                else
+                {
+                    Assert.Fail(string.Format("Client does not received reject event"));
+                }
+            };
+            var server = new TestServer(serviceName, serviceName);
+
+            server.ConnectionRequestEvent += (sender, e) =>
+            {
+                TestServer.ConnectionRequestEventArgs eventArgs = e as TestServer.ConnectionRequestEventArgs;
+                server.Reject(eventArgs.PeerInfo, "Test Reason");
+            };
+            try
+            {
+                server.Listen();
+            }
+            catch (Exception e)
+            {
+                Assert.Fail(string.Format("Exception occurred at Listen(): ", e.Message));
+            }
+
+            bool isRejected = await helper.WaitForEvent(60);
+            Assert.IsTrue(isRejected, string.Format("TIMEOUT: Failed to reject test client {0}", serviceName));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of ServerBase.GetConnectedPeerList")]
+        [Property("SPEC", "Tizen.Applications.Cion.ServerBase.GetConnectedPeerList M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task GetConnectedPeerList_RETURN_VALUE()
+        {
+            string serviceName = "GetConnectedPeerList_RETURN_VALUE";
+            WaitHelper helper = new WaitHelper();
+            var server = new TestServer(serviceName, serviceName);
+            PeerInfo peer = null;
+            server.ConnectionRequestEvent += (sender, e) =>
+            {
+                TestServer.ConnectionRequestEventArgs eventArgs = e as TestServer.ConnectionRequestEventArgs;
+                server.Accept(eventArgs.PeerInfo);
+                peer = eventArgs.PeerInfo;
+            };
+
+            server.ConnectionResultEvent += (sender, e) =>
+            {
+                TestServer.ConnectionResultEventArgs eventArgs = e as TestServer.ConnectionResultEventArgs;
+                helper.Done();
+            };
+            try
+            {
+                server.Listen();
+            }
+            catch (Exception e)
+            {
+                Assert.Fail(string.Format("Exception occurred at Listen(): ", e.Message));
+            }
+
+            var client = SetupClient(serviceName);
+            bool connected = await helper.WaitForEvent(60);
+            Assert.IsTrue(connected, string.Format("TIMEOUT: Failed to connect test service {0}", serviceName));
+
+            IEnumerable<PeerInfo> connectedPeers = server.GetConnectedPeerList();
+            Assert.AreEqual(1, connectedPeers.Count(), string.Format("Wrong connected peer number, Expected: ({0}), Actual: ({1}", 1, connectedPeers.Count()));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of ServerBase.SetOndemandLaunchEnabled")]
+        [Property("SPEC", "Tizen.Applications.Cion.ServerBase.SetOndemandLaunchEnabled M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void SetOndemandLaunchEnabled_CHECK_RESULT()
+        {
+            string serviceName = "SetOndemandLaunchEnabled_CHECK_RESULT";
+            var server = new TestServer(serviceName, serviceName);
+
+            try
+            {
+                server.SetOndemandLaunchEnabled(false);
+            }
+            catch (Exception e)
+            {
+                Assert.Fail(string.Format("Exception occurred at SetOndemandLaunchEnabled(): ", e.Message));
+            }
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of ServerBase.OnConnectionRequest")]
+        [Property("SPEC", "Tizen.Applications.Cion.ServerBase.OnConnectionRequest M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task OnConnectionRequest_CHECK_CB()
+        {
+            string serviceName = "OnConnectionRequest_CHECK_CB";
+            WaitHelper helper = new WaitHelper();
+            var server = new TestServer(serviceName, serviceName);
+            server.ConnectionRequestEvent += (sender, e) =>
+            {
+                helper.Done();
+            };
+
+            try
+            {
+                server.Listen();
+            }
+            catch (Exception e)
+            {
+                Assert.Fail(string.Format("Exception occurred at Listen(): ", e.Message));
+            }
+            var client = SetupClient(serviceName);
+
+            bool requested = await helper.WaitForEvent(60);
+            Assert.IsTrue(requested, string.Format("TIMEOUT: Failed to receive connection request test service {0}", serviceName));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of ServerBase.OnConnectionResult")]
+        [Property("SPEC", "Tizen.Applications.Cion.ServerBase.OnConnectionResult M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task OnConnectionResult_CHECK_CB()
+        {
+            string serviceName = "OnConnectionRequest_CHECK_CB";
+            WaitHelper helper = new WaitHelper();
+            var server = new TestServer(serviceName, serviceName);
+            server.ConnectionRequestEvent += (sender, e) =>
+            {
+                TestServer.ConnectionRequestEventArgs eventArgs = e as TestServer.ConnectionRequestEventArgs;
+                server.Accept(eventArgs.PeerInfo);
+            };
+
+            server.ConnectionResultEvent += (sender, e) =>
+            {
+                TestServer.ConnectionResultEventArgs eventArgs = e as TestServer.ConnectionResultEventArgs;
+                if (eventArgs.Result.Status != ConnectionStatus.OK)
+                    Assert.Fail("Failed to connect with client");
+                helper.Done();
+            };
+
+            try
+            {
+                server.Listen();
+            }
+            catch (Exception e)
+            {
+                Assert.Fail(string.Format("Exception occurred at Listen(): ", e.Message));
+            }
+            var client = SetupClient(serviceName);
+
+            bool result = await helper.WaitForEvent(60);
+            Assert.IsTrue(result, string.Format("TIMEOUT: Failed to receive connection result test service {0}", serviceName));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of ServerBase.OnDataReceived")]
+        [Property("SPEC", "Tizen.Applications.Cion.ServerBase.OnDataReceived M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task OnDataReceived_CHECK_CB()
+        {
+            string serviceName = "OnDataReceived_CHECK_CB";
+            WaitHelper helper = new WaitHelper();
+            var server = new TestServer(serviceName, serviceName);
+            server.ConnectionRequestEvent += (sender, e) =>
+            {
+                TestServer.ConnectionRequestEventArgs eventArgs = e as TestServer.ConnectionRequestEventArgs;
+                server.Accept(eventArgs.PeerInfo);
+            };
+
+            server.ConnectionResultEvent += (sender, e) =>
+            {
+                TestServer.ConnectionResultEventArgs eventArgs = e as TestServer.ConnectionResultEventArgs;
+                if (eventArgs.Result.Status != ConnectionStatus.OK)
+                    Assert.Fail("Failed to connect with client");
+                helper.Done();
+            };
+
+            try
+            {
+                server.Listen();
+            }
+            catch (Exception e)
+            {
+                Assert.Fail(string.Format("Exception occurred at Listen(): {0}", e.Message));
+            }
+            var client = SetupClient(serviceName);
+            WaitHelper helper2 = new WaitHelper();
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                if (eventArgs.Result.Status != ConnectionStatus.OK)
+                    Assert.Fail("Failed to connect with server");
+                helper2.Done();
+            };
+
+            bool result = await helper.WaitForEvent(60);
+            Assert.IsTrue(result, string.Format("TIMEOUT: Failed to receive connection result test service {0}", serviceName));
+            bool result2 = await helper2.WaitForEvent(60);
+            Assert.IsTrue(result2, string.Format("TIMEOUT: Failed to receive connection result test service {0}", serviceName));
+            helper.Reset();
+
+            server.DataReceivedEvent += (sender, e) =>
+            {
+                TestServer.DataReceivedEventArgs eventArgs = e as TestServer.DataReceivedEventArgs;
+                
+                Log.Debug("CION", "OnDataReceived " + eventArgs.Data.Length.ToString());
+
+                for (int i = 0; i < eventArgs.Data.Length; i++)
+                {
+                    Log.Debug("CION", "OnDataReceived " + eventArgs.Data[i].ToString());
+                }
+
+                if (Encoding.UTF8.GetString(eventArgs.Data) == TestServer.HelloMessage)
+
+
+                helper.Done();
+            };
+
+            Task<byte[]> task = Task.Run(() =>
+            {
+                return client.SendData(Encoding.UTF8.GetBytes(TestServer.HelloMessage), 5000);
+            });
+
+            bool dataReceived = await helper.WaitForEvent(60);
+            Assert.IsTrue(result, string.Format("TIMEOUT: Failed to receive data from test service {0}", serviceName));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of ServerBase.OnDisconnected")]
+        [Property("SPEC", "Tizen.Applications.Cion.ServerBase.OnDisconnected M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task OnDisconnected_CHECK_CB()
+        {
+            string serviceName = "ServerOnDisconnected_CHECK_CB";
+            WaitHelper helper = new WaitHelper();
+            var server = new TestServer(serviceName, serviceName);
+            server.ConnectionRequestEvent += (sender, e) =>
+            {
+                TestServer.ConnectionRequestEventArgs eventArgs = e as TestServer.ConnectionRequestEventArgs;
+                server.Accept(eventArgs.PeerInfo);
+            };
+
+            server.ConnectionResultEvent += (sender, e) =>
+            {
+                TestServer.ConnectionResultEventArgs eventArgs = e as TestServer.ConnectionResultEventArgs;
+                if (eventArgs.Result.Status != ConnectionStatus.OK)
+                    Assert.Fail("Failed to connect with client");
+                helper.Done();
+            };
+
+            try
+            {
+                server.Listen();
+            }
+            catch (Exception e)
+            {
+                Assert.Fail(string.Format("Exception occurred at Listen(): ", e.Message));
+            }
+            var client = SetupClient(serviceName);
+            WaitHelper helper2 = new WaitHelper();
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                if (eventArgs.Result.Status != ConnectionStatus.OK)
+                    Assert.Fail("Failed to connect with server");
+                helper2.Done();
+            };
+
+            bool result = await helper.WaitForEvent(60);
+            Assert.IsTrue(result, string.Format("TIMEOUT: Failed to receive connection result test service {0}", serviceName));
+            bool result2 = await helper2.WaitForEvent(60);
+            Assert.IsTrue(result2, string.Format("TIMEOUT: Failed to receive connection result test service {0}", serviceName));
+            helper.Reset();
+
+            WaitHelper test = new WaitHelper();
+            await test.WaitForEvent(20);
+
+            server.DisconnectedEvent += (sender, e) =>
+            {
+                helper.Done();
+            };
+
+            client.Disconnect();
+            bool disconnected = await helper.WaitForEvent(60);
+            Assert.IsTrue(disconnected, string.Format("TIMEOUT: Failed to receive disconnected result from test service {0}", serviceName));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of ServerBase.OnPayloadReceived")]
+        [Property("SPEC", "Tizen.Applications.Cion.ServerBase.OnPayloadReceived M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public async Task OnPayloadReceived_CHECK_CB()
+        {
+            string serviceName = "OnPayloadReceived_CHECK_CB";
+            WaitHelper helper = new WaitHelper();
+            var server = new TestServer(serviceName, serviceName);
+            server.ConnectionRequestEvent += (sender, e) =>
+            {
+                TestServer.ConnectionRequestEventArgs eventArgs = e as TestServer.ConnectionRequestEventArgs;
+                server.Accept(eventArgs.PeerInfo);
+            };
+
+            server.ConnectionResultEvent += (sender, e) =>
+            {
+                TestServer.ConnectionResultEventArgs eventArgs = e as TestServer.ConnectionResultEventArgs;
+                if (eventArgs.Result.Status != ConnectionStatus.OK)
+                    Assert.Fail("Failed to connect with client");
+                helper.Done();
+            };
+
+            try
+            {
+                server.Listen();
+            }
+            catch (Exception e)
+            {
+                Assert.Fail(string.Format("Exception occurred at Listen(): ", e.Message));
+            }
+            var client = SetupClient(serviceName);
+            WaitHelper helper2 = new WaitHelper();
+            client.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                if (eventArgs.Result.Status != ConnectionStatus.OK)
+                    Assert.Fail("Failed to connect with server");
+                helper2.Done();
+            };
+
+            bool result = await helper.WaitForEvent(60);
+            Assert.IsTrue(result, string.Format("TIMEOUT: Failed to receive connection result test service {0}", serviceName));
+            bool result2 = await helper2.WaitForEvent(60);
+            Assert.IsTrue(result2, string.Format("TIMEOUT: Failed to receive connection result test service {0}", serviceName));
+            helper.Reset();
+
+            server.PayloadReceivedEvent += (sender, e) =>
+            {
+                helper.Done();
+            };
+
+            client.SendPayloadAsync(new DataPayload(Encoding.UTF8.GetBytes("Test Data")));
+            bool payloadReceived = await helper.WaitForEvent(60);
+            Assert.IsTrue(payloadReceived, string.Format("TIMEOUT: Failed to receive payload from test service {0}", serviceName));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks the result of ServerBase.Dispose")]
+        [Property("SPEC", "Tizen.Applications.Cion.ServerBase.Dispose M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")]
+        public void Dispose_CHECK_RESULT()
+        {
+            string serviceName = "Dispose_CHECK_RESULT";
+            var server = new TestServer(serviceName, serviceName);
+
+            try
+            {
+                server.Dispose();
+            }
+            catch
+            {
+                Assert.Fail("Exception occurred while invoking Dispose().");
+            }
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TestClient.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TestClient.cs
new file mode 100755 (executable)
index 0000000..2dcf124
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ *  Copyright (c) 2021 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 System;
+
+namespace Tizen.Applications.Cion.Tests
+{
+    public class TestClient : ClientBase
+    {
+        public event EventHandler ConnectionResultEvent;
+        public event EventHandler DisconnectedEvent;
+        public event EventHandler DiscoveredEvent;
+        public event EventHandler PayloadReceivedEvent;
+
+        public TestClient(string serviceName) : base(serviceName)
+        {
+        }
+
+        public TestClient(string serviceName, SecurityInfo securityInfo) : base(serviceName, securityInfo)
+        {
+        }
+
+        protected override void OnConnectionResult(PeerInfo peerInfo, ConnectionResult result)
+        {
+            ConnectionResultEventArgs eventArgs = new ConnectionResultEventArgs(peerInfo, result);
+            ConnectionResultEvent?.Invoke(this, eventArgs);
+        }
+
+        protected override void OnDisconnected(PeerInfo peerInfo)
+        {
+            DisconnectedEventArgs eventArgs = new DisconnectedEventArgs(peerInfo);
+            DisconnectedEvent?.Invoke(this, eventArgs);
+        }
+
+        protected override void OnDiscovered(PeerInfo peerInfo)
+        {
+            DiscoveredEventArgs eventArgs = new DiscoveredEventArgs(peerInfo);
+            DiscoveredEvent?.Invoke(this, eventArgs);
+        }
+
+        protected override void OnPayloadReceived(Payload payload, PayloadTransferStatus status)
+        {
+            PayloadReceivedEventArgs eventArgs = new PayloadReceivedEventArgs(payload, status);
+            PayloadReceivedEvent?.Invoke(this, eventArgs);
+        }
+
+        public class ConnectionResultEventArgs : EventArgs
+        {
+            public ConnectionResultEventArgs(PeerInfo peerInfo, ConnectionResult result)
+            {
+                PeerInfo = peerInfo;
+                Result = result;
+            }
+            public PeerInfo PeerInfo { get; }
+            public ConnectionResult Result { get; }
+        }
+
+        public class DisconnectedEventArgs : EventArgs
+        {
+            public DisconnectedEventArgs(PeerInfo peerInfo)
+            {
+                PeerInfo = peerInfo;
+            }
+            public PeerInfo PeerInfo { get; }
+        }
+
+        public class DiscoveredEventArgs : EventArgs
+        {
+            public DiscoveredEventArgs(PeerInfo peerInfo)
+            {
+                PeerInfo = peerInfo;
+            }
+            public PeerInfo PeerInfo { get; }
+        }
+
+        public class PayloadReceivedEventArgs : EventArgs
+        {
+            public PayloadReceivedEventArgs(Payload payload, PayloadTransferStatus status)
+            {
+                Payload = payload;
+                Status = status;
+            }
+            public Payload Payload { get; }
+            public PayloadTransferStatus Status { get; }
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TestGroup.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TestGroup.cs
new file mode 100755 (executable)
index 0000000..5040470
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ *  Copyright (c) 2021 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 System;
+
+namespace Tizen.Applications.Cion.Tests
+{
+    public class TestGroup : GroupBase
+    {
+        public event EventHandler JoinedEvent;
+        public event EventHandler LeftEvent;
+        public event EventHandler PayloadReceivedEvent;
+
+        public TestGroup(string serviceName) : base(serviceName)
+        {
+        }
+
+        public TestGroup(string serviceName, SecurityInfo securityInfo) : base(serviceName, securityInfo)
+        {
+        }
+
+        protected override void OnJoined(PeerInfo peerInfo)
+        {
+            JoinedEventArgs eventArgs = new JoinedEventArgs(peerInfo);
+            JoinedEvent?.Invoke(this, eventArgs);
+        }
+
+        protected override void OnLeft(PeerInfo peerInfo)
+        {
+            LeftEventArgs eventArgs = new LeftEventArgs(peerInfo);
+            LeftEvent?.Invoke(this, eventArgs);
+        }
+
+        protected override void OnPayloadReceived(Payload payload, PeerInfo peer)
+        {
+            PayloadReceivedEventArgs eventArgs = new PayloadReceivedEventArgs(payload, peer);
+            PayloadReceivedEvent?.Invoke(this, eventArgs);
+        }
+
+        public class JoinedEventArgs : EventArgs
+        {
+            public JoinedEventArgs(PeerInfo peerInfo)
+            {
+                PeerInfo = peerInfo;
+            }
+            public PeerInfo PeerInfo { get; }
+        }
+
+        public class LeftEventArgs : EventArgs
+        {
+            public LeftEventArgs(PeerInfo peerInfo)
+            {
+                PeerInfo = peerInfo;
+            }
+            public PeerInfo PeerInfo { get; }
+        }
+
+        public class PayloadReceivedEventArgs : EventArgs
+        {
+            public PayloadReceivedEventArgs(Payload payload, PeerInfo peerInfo)
+            {
+                Payload = payload;
+                PeerInfo = peerInfo;
+            }
+            public Payload Payload { get; }
+            public PeerInfo PeerInfo { get; }
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TestHelper.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TestHelper.cs
new file mode 100755 (executable)
index 0000000..c1fdacf
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ *  Copyright (c) 2021 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 System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tizen.Applications.Cion.Tests
+{
+    public class TestHelper
+    {
+        private const string _serviceName = "TestServiceName";
+        private const string _displayName = "TestDisplayName";
+        private static Lazy<TestClient> _testClient;
+        private static Lazy<TestServer> _testServer;
+
+        internal static TestClient TestClient { get { return _testClient.Value; } }
+        internal static TestServer TestServer { get { return _testServer.Value; } }
+
+        private static PeerInfo _connectedServer = null;
+
+        static TestHelper()
+        {
+            _testClient = new Lazy<TestClient>(() => new TestClient(_serviceName));
+            _testServer = new Lazy<TestServer>(() => new TestServer(_serviceName, _displayName));
+
+            _testClient.Value.DiscoveredEvent += (sender, e) =>
+            {
+                TestClient.DiscoveredEventArgs eventArgs = e as TestClient.DiscoveredEventArgs;
+                _testClient.Value.Connect(eventArgs.PeerInfo);
+            };
+
+            _testClient.Value.ConnectionResultEvent += (sender, e) =>
+            {
+                TestClient.ConnectionResultEventArgs eventArgs = e as TestClient.ConnectionResultEventArgs;
+                if (eventArgs.Result.Status == ConnectionStatus.OK)
+                    _connectedServer = eventArgs.PeerInfo;
+            };
+
+            _testServer.Value.ConnectionRequestEvent += (sender, e) =>
+            {
+                TestServer.ConnectionRequestEventArgs eventArgs = e as TestServer.ConnectionRequestEventArgs;
+                _testServer.Value.Accept(eventArgs.PeerInfo);
+            };
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TestServer.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TestServer.cs
new file mode 100755 (executable)
index 0000000..7c6cc99
--- /dev/null
@@ -0,0 +1,125 @@
+/*
+ *  Copyright (c) 2021 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 System;
+using System.Text;
+
+namespace Tizen.Applications.Cion.Tests
+{
+    public class TestServer : ServerBase
+    {
+        public event EventHandler ConnectionResultEvent;
+        public event EventHandler ConnectionRequestEvent;
+        public event EventHandler DataReceivedEvent;
+        public event EventHandler DisconnectedEvent;
+        public event EventHandler PayloadReceivedEvent;
+
+        public static string HelloMessage = "Test Hello";
+        public static string WorldMessage = "Test World";
+
+        public TestServer(string serviceName, string displayName) : base(serviceName, displayName)
+        {
+        }
+
+        public TestServer(string serviceName, string displayName, SecurityInfo securityInfo) : base(serviceName, displayName, securityInfo)
+        {
+        }
+
+        protected override void OnConnectionResult(PeerInfo peerInfo, ConnectionResult result)
+        {
+            ConnectionResultEventArgs eventArgs = new ConnectionResultEventArgs(result);
+            ConnectionResultEvent?.Invoke(this, eventArgs);
+        }
+
+        protected override void OnConnectionRequest(PeerInfo peerInfo)
+        {
+            ConnectionRequestEventArgs eventArgs = new ConnectionRequestEventArgs(peerInfo);
+            ConnectionRequestEvent?.Invoke(this, eventArgs);
+        }
+
+        protected override byte[] OnDataReceived(byte[] data, PeerInfo peerInfo)
+        {
+            DataReceivedEventArgs eventArgs = new DataReceivedEventArgs(data, peerInfo);
+            DataReceivedEvent?.Invoke(this, eventArgs);
+            eventArgs.ReplyData = Encoding.UTF8.GetBytes(TestServer.WorldMessage);
+            return eventArgs.ReplyData;
+        }
+
+        protected override void OnDisconnected(PeerInfo peerInfo)
+        {
+            DisconnectedEventArgs eventArgs = new DisconnectedEventArgs(peerInfo);
+            DisconnectedEvent?.Invoke(this, eventArgs);
+        }
+
+        protected override void OnPayloadReceived(Payload data, PeerInfo peerInfo, PayloadTransferStatus status)
+        {
+            PayloadReceivedEventArgs eventArgs = new PayloadReceivedEventArgs(data, peerInfo, status);
+            PayloadReceivedEvent?.Invoke(this, eventArgs);
+        }
+
+        public class ConnectionResultEventArgs : EventArgs
+        {
+            public ConnectionResultEventArgs(ConnectionResult result)
+            {
+                Result = result;
+            }
+            public ConnectionResult Result { get; }
+        }
+
+        public class ConnectionRequestEventArgs : EventArgs
+        {
+            public ConnectionRequestEventArgs(PeerInfo peerInfo)
+            {
+                PeerInfo = peerInfo;
+            }
+            public PeerInfo PeerInfo { get; }
+        }
+
+        public class DataReceivedEventArgs : EventArgs
+        {
+            public DataReceivedEventArgs(byte[] data, PeerInfo peerInfo)
+            {
+                Data = data;
+                PeerInfo = peerInfo;
+            }
+            public byte[] Data { get; }
+            public PeerInfo PeerInfo { get; }
+            public byte[] ReplyData { get; set; }
+        }
+
+        public class DisconnectedEventArgs : EventArgs
+        {
+            public DisconnectedEventArgs(PeerInfo peerInfo)
+            {
+                PeerInfo = peerInfo;
+            }
+            public PeerInfo PeerInfo { get; }
+        }
+
+        public class PayloadReceivedEventArgs : EventArgs
+        {
+            public PayloadReceivedEventArgs(Payload data, PeerInfo peerInfo, PayloadTransferStatus status)
+            {
+                Payload = data;
+                PeerInfo = peerInfo;
+                Status = status;
+            }
+            public Payload Payload { get; }
+            public PeerInfo PeerInfo { get; }
+            public PayloadTransferStatus Status { get; }
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/WaitHelper.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/WaitHelper.cs
new file mode 100755 (executable)
index 0000000..87f6c55
--- /dev/null
@@ -0,0 +1,28 @@
+using NUnit.Framework.TUnit;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tizen.Applications.Cion.Tests
+{
+    public class WaitHelper
+    {
+        private bool _isDone;
+        public void Done() { _isDone = true; }
+        public void Reset() { _isDone = false; }
+        public async Task<bool> WaitForEvent(int timeoutInSec)
+        {
+            int count = 0;
+            while (true)
+            {
+                await Task.Delay(1000);
+                LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Waiting for event for sec: " + count);
+                if (_isDone) break;
+                if (++count == timeoutInSec) break;
+            }
+            return _isDone;
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/tizen-manifest.xml b/tct-suite-vs/Tizen.Applications.Cion.Tests/tizen-manifest.xml
new file mode 100755 (executable)
index 0000000..9bfdf14
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest package="Tizen.Applications.Cion.Tests" version="1.0.0" api-version="7.5" xmlns="http://tizen.org/ns/packages">
+    <profile name="common" />
+    <ui-application appid="Tizen.Applications.Cion.Tests" exec="Tizen.Applications.Cion.Tests.dll" multiple="false" taskmanage="true" type="dotnet" launch_mode="single">
+        <icon>Tizen.Applications.Cion.Tests.png</icon>
+        <label>Tizen.Applications.Cion.Tests</label>
+        <splash-screens />
+    </ui-application>
+    <shortcut-list />
+    <privileges>
+        <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+        <privilege>http://tizen.org/privilege/d2d.remotelaunch</privilege>
+        <privilege>http://tizen.org/privilege/d2d.datasharing</privilege>
+        <privilege>http://tizen.org/privilege/internet</privilege>
+    </privileges>
+    <dependencies />
+    <provides-appdefined-privileges />
+</manifest>