[Non-ACR][IoTConnectivityServer] Fix build errors 74/282074/1
authorDohyun Pyun <dh79.pyun@samsung.com>
Mon, 26 Sep 2022 22:59:23 +0000 (07:59 +0900)
committerDohyun Pyun <dh79.pyun@samsung.com>
Mon, 26 Sep 2022 22:59:23 +0000 (07:59 +0900)
Explictly add the class of Resource

Change-Id: I7027640f43dea92b6ad1a6ba10d758da995cc15e
Signed-off-by: Dohyun Pyun <dh79.pyun@samsung.com>
tct-suite-vs/Tizen.IoTConnectivityServer.Tests/testcase/TSIoTConnectivityServerManager.cs
tct-suite-vs/Tizen.IoTConnectivityServer.Tests/testcase/TSRequest.cs
tct-suite-vs/Tizen.IoTConnectivityServer.Tests/testcase/TSResource.cs

index 07dcc74..2f2cf4f 100755 (executable)
@@ -12,14 +12,13 @@ namespace Tizen.IoTConnectivityServer.Tests
     {
         public static string datPath = "/opt/usr/home/owner/share/res/iotcon-test-svr-db-server.dat";
         internal const string LOGTAG = "IOT-TEST";
-
         private static bool isSupported = false;
 
         [SetUp]
         public static void Init()
         {
             Log.Info(LOGTAG, "ServerManagerTest Init");
-            Information.TryGetValue("http://tizen.org/feature/iot.ocf", out isSupported);
+            Tizen.System.Information.TryGetValue("http://tizen.org/feature/iot.ocf", out isSupported);
         }
 
         [TearDown]
@@ -143,7 +142,7 @@ namespace Tizen.IoTConnectivityServer.Tests
                 Attributes attributes = new Attributes {
                     { "state", "ON" }
                 };
-                Resource res = new LiteResource("/room/1", types, ResourcePolicy.Discoverable, attributes);
+                Tizen.Network.IoTConnectivity.Resource res = new LiteResource("/room/1", types, ResourcePolicy.Discoverable, attributes);
 
                 /* TEST CODE */
                 IoTConnectivityServerManager.RegisterResource(res);
@@ -183,7 +182,7 @@ namespace Tizen.IoTConnectivityServer.Tests
                 Attributes attributes = new Attributes {
                     { "state", "ON" }
                 };
-                Resource res = new LiteResource("", types, ResourcePolicy.Discoverable, attributes);
+                Tizen.Network.IoTConnectivity.Resource res = new LiteResource("", types, ResourcePolicy.Discoverable, attributes);
 
                 /* TEST CODE */
                 IoTConnectivityServerManager.RegisterResource(res);
@@ -225,7 +224,7 @@ namespace Tizen.IoTConnectivityServer.Tests
                 Attributes attributes = new Attributes {
                     { "state", "ON" }
                 };
-                Resource res = new LiteResource("/room/1", types, ResourcePolicy.Discoverable, attributes);
+                Tizen.Network.IoTConnectivity.Resource res = new LiteResource("/room/1", types, ResourcePolicy.Discoverable, attributes);
                 IoTConnectivityServerManager.RegisterResource(res);
 
                 /* TEST CODE */
index c1b5eb6..629b255 100755 (executable)
@@ -19,7 +19,7 @@ namespace Tizen.IoTConnectivityServer.Tests
         internal static ResourceOptions Options = null;
     }
 
-    public class DoorResourceNew : Resource
+    public class DoorResourceNew : Tizen.Network.IoTConnectivity.Resource
     {
         internal const string LOGTAG = "IOT-TEST";
         private const string _attribute = "DOOR_ATTRIBUTE5";
@@ -74,7 +74,7 @@ namespace Tizen.IoTConnectivityServer.Tests
         {
             Log.Info(LOGTAG, "OnPost Received in DoorResourceNew, UriPath:" + UriPath + ", Host: " + request.HostAddress);
             ResourceTypes typesNew = new ResourceTypes(new List<string>() { "oic.iot.door6" });
-            Resource resource = new DoorResourceNew("/door/uri6", typesNew, Interfaces, Policy);
+            Tizen.Network.IoTConnectivity.Resource resource = new DoorResourceNew("/door/uri6", typesNew, Interfaces, Policy);
             IoTConnectivityServerManager.RegisterResource(resource);
             Representation newRepresentation = new Representation();
             newRepresentation.UriPath = "/door/uri6";
@@ -145,7 +145,7 @@ namespace Tizen.IoTConnectivityServer.Tests
         public static void Init()
         {
             Log.Info(LOGTAG, "RequestTests Init");
-            Information.TryGetValue("http://tizen.org/feature/iot.ocf", out isSupported);
+            Tizen.System.Information.TryGetValue("http://tizen.org/feature/iot.ocf", out isSupported);
             RequestData.OnGetReceivedFlag = false;
             RequestData.OnPutReceivedFlag = false;
             if (!_isRegistered && isSupported)
@@ -155,7 +155,7 @@ namespace Tizen.IoTConnectivityServer.Tests
                 ifaces.Add(ResourceInterfaces.BatchInterface);
                 ResourceTypes types = new ResourceTypes(new List<string>() { "oic.iot.door.new" });
 
-                Resource resource = new DoorResourceNew("/door/1", types, ifaces, ResourcePolicy.Discoverable | ResourcePolicy.Observable);
+                Tizen.Network.IoTConnectivity.Resource resource = new DoorResourceNew("/door/1", types, ifaces, ResourcePolicy.Discoverable | ResourcePolicy.Observable);
                 IoTConnectivityServerManager.RegisterResource(resource);
                 _isRegistered = true;
             }
index d16642b..02cda16 100644 (file)
@@ -19,7 +19,7 @@ namespace Tizen.IoTConnectivityServer.Tests
         internal static bool OnObservingReceivedFlag = false;
     }
 
-    public class DoorResource : Resource
+    public class DoorResource : Tizen.Network.IoTConnectivity.Resource
     {
         internal const string LOGTAG = "IOT-TEST";
         public const string DoorUri = "/door/uri5";
@@ -75,7 +75,7 @@ namespace Tizen.IoTConnectivityServer.Tests
             Log.Info(LOGTAG, "OnPost Received in DoorResource, UriPath:" + UriPath);
             Flags.OnPostReceivedFlag = true;
             ResourceTypes typesNew = new ResourceTypes(new List<string>() { "oic.iot.door6" });
-            Resource resource = new DoorResource("/door/uri6", typesNew, Interfaces, Policy);
+            Tizen.Network.IoTConnectivity.Resource resource = new DoorResource("/door/uri6", typesNew, Interfaces, Policy);
             IoTConnectivityServerManager.RegisterResource(resource);
             Representation newRepresentation = new Representation();
             newRepresentation.UriPath = "/door/uri6";
@@ -144,7 +144,7 @@ namespace Tizen.IoTConnectivityServer.Tests
         public static void Init()
         {
             Log.Info(LOGTAG, "ResourceTests Init");
-            Information.TryGetValue("http://tizen.org/feature/iot.ocf", out isSupported);
+            Tizen.System.Information.TryGetValue("http://tizen.org/feature/iot.ocf", out isSupported);
             Flags.OnGetReceivedFlag = false;
             Flags.OnPostReceivedFlag = false;
             Flags.OnPutReceivedFlag = false;
@@ -157,7 +157,7 @@ namespace Tizen.IoTConnectivityServer.Tests
                 ifaces.Add(ResourceInterfaces.BatchInterface);
                 ResourceTypes types = new ResourceTypes(new List<string>() { "oic.iot.door.new1" });
 
-                Resource resource = new DoorResource("/door/2", types, ifaces, ResourcePolicy.Discoverable | ResourcePolicy.Observable);
+                Tizen.Network.IoTConnectivity.Resource resource = new DoorResource("/door/2", types, ifaces, ResourcePolicy.Discoverable | ResourcePolicy.Observable);
                 IoTConnectivityServerManager.RegisterResource(resource);
                 _isRegistered = true;
             }
@@ -187,7 +187,7 @@ namespace Tizen.IoTConnectivityServer.Tests
                 ifaces.Add(ResourceInterfaces.BatchInterface);
                 ResourceTypes types = new ResourceTypes(new List<string>() { "oic.iot.door.new" });
 
-                Resource resource = new DoorResource(DoorResource.DoorUri, types, ifaces, ResourcePolicy.Discoverable | ResourcePolicy.Observable);
+                Tizen.Network.IoTConnectivity.Resource resource = new DoorResource(DoorResource.DoorUri, types, ifaces, ResourcePolicy.Discoverable | ResourcePolicy.Observable);
                 Assert.IsInstanceOf<DoorResource>(resource, "Object should be of type DoorResource");
 
                 resource?.Dispose();
@@ -220,7 +220,7 @@ namespace Tizen.IoTConnectivityServer.Tests
                 ResourceInterfaces ifaces = new ResourceInterfaces(new List<string>() { ResourceInterfaces.DefaultInterface });
                 ifaces.Add(ResourceInterfaces.BatchInterface);
                 ResourceTypes types = new ResourceTypes(new List<string>() { "oic.iot.door.new" });
-                Resource resource = new DoorResource(DoorResource.DoorUri, types, ifaces, ResourcePolicy.Discoverable | ResourcePolicy.Observable);
+                Tizen.Network.IoTConnectivity.Resource resource = new DoorResource(DoorResource.DoorUri, types, ifaces, ResourcePolicy.Discoverable | ResourcePolicy.Observable);
 
                 /* TEST CODE */
                 Assert.IsInstanceOf<ResourceInterfaces>(resource.Interfaces, "Property should be of type ResourceInterfaces");
@@ -257,7 +257,7 @@ namespace Tizen.IoTConnectivityServer.Tests
                 ResourceInterfaces ifaces = new ResourceInterfaces(new List<string>() { ResourceInterfaces.DefaultInterface });
                 ifaces.Add(ResourceInterfaces.BatchInterface);
                 ResourceTypes types = new ResourceTypes(new List<string>() { "oic.iot.door.new" });
-                Resource resource = new DoorResource(DoorResource.DoorUri, types, ifaces, ResourcePolicy.Discoverable | ResourcePolicy.Observable);
+                Tizen.Network.IoTConnectivity.Resource resource = new DoorResource(DoorResource.DoorUri, types, ifaces, ResourcePolicy.Discoverable | ResourcePolicy.Observable);
 
                 /* TEST CODE */
                 Assert.IsInstanceOf<ResourceTypes>(resource.Types, "Property should be of type ResourceTypes");
@@ -293,7 +293,7 @@ namespace Tizen.IoTConnectivityServer.Tests
                 ResourceInterfaces ifaces = new ResourceInterfaces(new List<string>() { ResourceInterfaces.DefaultInterface });
                 ifaces.Add(ResourceInterfaces.BatchInterface);
                 ResourceTypes types = new ResourceTypes(new List<string>() { "oic.iot.door.new" });
-                Resource resource = new DoorResource(DoorResource.DoorUri, types, ifaces, ResourcePolicy.Discoverable);
+                Tizen.Network.IoTConnectivity.Resource resource = new DoorResource(DoorResource.DoorUri, types, ifaces, ResourcePolicy.Discoverable);
 
                 /* TEST CODE */
                 Assert.IsInstanceOf<string>(resource.UriPath, "UriPath Property should be of type string");
@@ -329,7 +329,7 @@ namespace Tizen.IoTConnectivityServer.Tests
                 ResourceInterfaces ifaces = new ResourceInterfaces(new List<string>() { ResourceInterfaces.DefaultInterface });
                 ifaces.Add(ResourceInterfaces.BatchInterface);
                 ResourceTypes types = new ResourceTypes(new List<string>() { "oic.iot.door.new" });
-                Resource resource = new DoorResource(DoorResource.DoorUri, types, ifaces, ResourcePolicy.Discoverable);
+                Tizen.Network.IoTConnectivity.Resource resource = new DoorResource(DoorResource.DoorUri, types, ifaces, ResourcePolicy.Discoverable);
 
                 /* TEST CODE */
                 Assert.IsInstanceOf<ResourcePolicy>(resource.Policy, "Property should be of type ResourcePolicy");
@@ -370,18 +370,18 @@ namespace Tizen.IoTConnectivityServer.Tests
                 ResourceTypes types1 = new ResourceTypes(new List<string>() { "oic.iot.door.new1" });
                 ResourceTypes types2 = new ResourceTypes(new List<string>() { "oic.iot.door.new2" });
 
-                Resource resource = new DoorResource(DoorResource.DoorUri, types, ifaces, ResourcePolicy.Discoverable);
+                Tizen.Network.IoTConnectivity.Resource resource = new DoorResource(DoorResource.DoorUri, types, ifaces, ResourcePolicy.Discoverable);
                 IoTConnectivityServerManager.RegisterResource(resource);
 
-                Resource child1 = new DoorResource(DoorResource.DoorUri1, types1, ifaces, ResourcePolicy.Discoverable);
-                Resource child2 = new DoorResource(DoorResource.DoorUri2, types2, ifaces, ResourcePolicy.Discoverable);
+                Tizen.Network.IoTConnectivity.Resource child1 = new DoorResource(DoorResource.DoorUri1, types1, ifaces, ResourcePolicy.Discoverable);
+                Tizen.Network.IoTConnectivity.Resource child2 = new DoorResource(DoorResource.DoorUri2, types2, ifaces, ResourcePolicy.Discoverable);
                 IoTConnectivityServerManager.RegisterResource(child1);
                 IoTConnectivityServerManager.RegisterResource(child2);
                 resource.Children.Add(child1);
                 resource.Children.Add(child2);
 
                 /* TEST CODE */
-                Assert.IsInstanceOf<ObservableCollection<Resource>>(resource.Children, "Children Property should be of type ObservableCollection");
+                Assert.IsInstanceOf<ObservableCollection<Tizen.Network.IoTConnectivity.Resource>>(resource.Children, "Children Property should be of type ObservableCollection");
                 Assert.AreEqual(resource.Children.Count, 2, "Count is incorrect");
                 Assert.AreEqual(resource.Children.ElementAt(0), child1, "Something goes wrong with 1st child");
                 Assert.AreEqual(resource.Children.ElementAt(1), child2, "Something goes wrong with 2nd child");
@@ -421,7 +421,7 @@ namespace Tizen.IoTConnectivityServer.Tests
                 ifaces.Add(ResourceInterfaces.BatchInterface);
                 ResourceTypes types = new ResourceTypes(new List<string>() { "oic.iot.door.new.notify" });
 
-                Resource resource = new DoorResource("/door/uri/new/notify", types, ifaces, ResourcePolicy.Discoverable | ResourcePolicy.Observable);
+                Tizen.Network.IoTConnectivity.Resource resource = new DoorResource("/door/uri/new/notify", types, ifaces, ResourcePolicy.Discoverable | ResourcePolicy.Observable);
                 IoTConnectivityServerManager.RegisterResource(resource);
 
                 /* TEST CODE */
@@ -637,7 +637,7 @@ namespace Tizen.IoTConnectivityServer.Tests
                 ifaces.Add(ResourceInterfaces.BatchInterface);
                 ResourceTypes types = new ResourceTypes(new List<string>() { "oic.iot.door.new" });
 
-                Resource resource = new DoorResource(DoorResource.DoorUri, types, ifaces, ResourcePolicy.Discoverable | ResourcePolicy.Observable);
+                Tizen.Network.IoTConnectivity.Resource resource = new DoorResource(DoorResource.DoorUri, types, ifaces, ResourcePolicy.Discoverable | ResourcePolicy.Observable);
 
                 /* TEST CODE */
                 Assert.IsNotNull(resource, "Resource should not be null before calling Dispose.");