From 033dd60f549b3e03edd3f64509a46a398a3d024d Mon Sep 17 00:00:00 2001 From: Cheoleun Moon Date: Mon, 12 Nov 2018 18:07:10 +0900 Subject: [PATCH] [Network][TCSACR-190][Add a TCT for IsRoaming property] Change-Id: Ic3cafffd61566b590d0acc547fa8c7aa8ee3a913 Signed-off-by: Cheoleun Moon --- .../testcase/TSCellularProfile.cs | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/tct-suite-vs/Tizen.Network.Tests/testcase/TSCellularProfile.cs b/tct-suite-vs/Tizen.Network.Tests/testcase/TSCellularProfile.cs index 01ce6be7e..4839f1897 100755 --- a/tct-suite-vs/Tizen.Network.Tests/testcase/TSCellularProfile.cs +++ b/tct-suite-vs/Tizen.Network.Tests/testcase/TSCellularProfile.cs @@ -262,6 +262,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.")] -- 2.34.1