[Network][TCSACR-190][Add a TCT for IsRoaming property] 87/192887/3
authorCheoleun Moon <chleun.moon@samsung.com>
Mon, 12 Nov 2018 09:07:10 +0000 (18:07 +0900)
committerCheoleun Moon <chleun.moon@samsung.com>
Thu, 22 Nov 2018 07:14:50 +0000 (16:14 +0900)
Change-Id: Ic3cafffd61566b590d0acc547fa8c7aa8ee3a913
Signed-off-by: Cheoleun Moon <chleun.moon@samsung.com>
tct-suite-vs/Tizen.Network.Tests/testcase/TSCellularProfile.cs

index 01ce6be..4839f18 100755 (executable)
@@ -264,6 +264,49 @@ namespace Tizen.Network.Connection.Tests
 
         [Test]
         [Category("P1")]
+        [Description("Test:Checks whether the profile is hidden.")]
+        [Property("SPEC", "Tizen.Network.Connection.CellularProfile.IsRoaming A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Cheoleun Moon, chleun.moon@samsung.com")]
+        public void IsRoaming_GET()
+        {
+            CellularProfile _cellularProfile = null;
+            try
+            {
+                Log.Info(Globals.LogTag, "IsRoaming_GET start");
+                if (ConnectionManager.CellularState == CellularState.OutOfService)
+                {
+                    Assert.IsTrue(true, "Out of service");
+                    return;
+                }
+                Log.Info(Globals.LogTag, "Try to GetDefaultCellularProfile");
+                var connection = ConnectionProfileManager.GetDefaultCellularProfile(CellularServiceType.Internet);
+                Assert.IsNotNull(connection, "Fail to get a ConnectionProfile");
+                Log.Info(Globals.LogTag, "Get default cellular profile");
+                _cellularProfile = (CellularProfile)connection;
+                Assert.IsFalse(_cellularProfile.IsRoaming, "IsRoaming is true");
+                Log.Info(Globals.LogTag, "IsRoaming_GET done");
+            }
+            catch (NotSupportedException)
+            {
+                Assert.IsTrue(isTelephonySupported == false, "Invalid NotSupportedException");
+            }
+            catch (Exception ex)
+            {
+                Assert.IsTrue(false, "Exception occurs. Msg : " + ex.ToString());
+            }
+            finally
+            {
+                if (_cellularProfile != null)
+                {
+                    _cellularProfile.Dispose();
+                }
+            }
+        }
+
+        [Test]
+        [Category("P1")]
         [Description("Test: Gets cellular Authentification Information.")]
         [Property("SPEC", "Tizen.Network.Connection.CellularProfile.CellularAuthInfo A")]
         [Property("SPEC_URL", "-")]