{
Assert.IsTrue(isNfcSupported == false || isCeSupported == false, "Method throw the NotSupportedException, but Tizen support the Nfc opearation");
}
- }
-
- [Test]
- [Category("P1")]
- [Description("Give the priority to the foreground application when dispatching transaction event.")]
- [Property("SPEC", "Tizen.Network.Nfc.NfcCardEmulationAdapter.EnableTransactionForegroundDispatch M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "Gowtham, gowtham.ab@samsung.com")]
- public static void EnableTransactionForegroundDispatch_METHOD_CALL_AND_CHECK_SUCCESS()
- {
- try
- {
- NfcCardEmulationAdapter ceAdapter = NfcManager.GetCardEmulationAdapter();
-
- /* TEST CODE */
- ceAdapter.EnableTransactionForegroundDispatch();
- }
- catch (NotSupportedException)
- {
- Assert.IsTrue(isNfcSupported == false || isCeSupported == false, "Method throw the NotSupportedException, but Tizen support the Nfc opearation");
- }
+ }\r
+\r
+ [Test]\r
+ [Category("P2")]\r
+ [Description("Enable Transaction Foreground Dispatch with not foreground environment, and check Invalid operation exception")]\r
+ [Property("SPEC", "Tizen.Network.Nfc.NfcCardEmulationAdapter.EnableTransactionForegroundDispatch M")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "MEX")]\r
+ [Property("AUTHOR", "Jihoon, jh8801.jung@samsung.com")]\r
+ public void EnableTransactionForegroundDispatch_CHECK_INVALID_OPERATION_EXCEPTION()\r
+ {\r
+ NfcCardEmulationAdapter ceAdapter = null;\r
+\r
+ try\r
+ {\r
+ ceAdapter = NfcManager.GetCardEmulationAdapter();\r
+ Assert.IsNotNull(ceAdapter, "ceAdapter should not be null");
+\r
+ /* TEST CODE */\r
+ ceAdapter.EnableTransactionForegroundDispatch();\r
+ }\r
+ catch (NotSupportedException)\r
+ {\r
+ Assert.IsTrue(isNfcSupported == false || isCeSupported == false, "Method throw the NotSupportedException, but Tizen support the Nfc opearation");\r
+ }\r
+ catch (InvalidOperationException)\r
+ {\r
+ Assert.IsTrue(true, "It is normal operation because the api caller should be on forground, but TC program can't on forgound.");\r
+ }\r
+\r
+ finally\r
+ {\r
+ /* POSTCONDITION\r
+ * 1. Reset variables\r
+ */\r
+\r
+ if (ceAdapter != null)\r
+ {\r
+ ceAdapter = null;\r
+ }\r
+ }\r
}
[Test]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MAC")]
[Property("AUTHOR", "Gowtham, gowtham.ab@samsung.com")]
- public static void RegisterAid_METHOD_CALL_WITH_HCE_PAYMENT()
+ public void RegisterAid_METHOD_CALL_WITH_HCE_PAYMENT()
{
try
{
/* TEST CODE */
ceAdapter.RegisterAid(NfcSecureElementType.Hce, NfcCardEmulationCategoryType.Payment, "325041592E5359532E4444463031");
+ ceAdapter.UnregisterAid(NfcSecureElementType.Hce, NfcCardEmulationCategoryType.Payment, "325041592E5359532E4444463031");
}
catch (NotSupportedException)
{
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Jihoon Jung, jh8801.jung@samsung.com")]
- public static void RegisterAid_CHECK_NULL_REFERENCE_EXCEPTION()
+ public void RegisterAid_CHECK_NULL_REFERENCE_EXCEPTION()
{
/*
* TEST CODE
catch (NotSupportedException)
{
Assert.IsTrue(isNfcSupported == false || isHceSupported == false, "Method throw the NotSupportedException, but Tizen support the Nfc opearation");
+ }\r
+ catch (Exception ex)\r
+ {\r
+ Assert.True(true, "Null Reference Exception occurs. Msg : " + ex.ToString());\r
}
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Jihoon Jung, jh8801.jung@samsung.com")]
- public static void UnregisterAid_CHECK_NULL_REFERENCE_EXCEPTION()
+ public void UnregisterAid_CHECK_NULL_REFERENCE_EXCEPTION()
{
/*
* TEST CODE
catch (NotSupportedException)
{
Assert.IsTrue(isNfcSupported == false || isHceSupported == false, "Method throw the NotSupportedException, but Tizen support the Nfc opearation");
+ }\r
+ catch (Exception ex)\r
+ {\r
+ Assert.True(true, "Null Reference Exception occurs. Msg : " + ex.ToString());\r
}
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MAC")]
[Property("AUTHOR", "Gowtham, gowtham.ab@samsung.com")]
- public static void GetRegisteredAidInformation_METHOD_RETURN_WITH_HCE()
+ public void GetRegisteredAidInformation_METHOD_RETURN_WITH_HCE()
{
try
{
NfcCardEmulationAdapter ceAdapter = NfcManager.GetCardEmulationAdapter();
ceAdapter.RegisterAid(NfcSecureElementType.Hce, NfcCardEmulationCategoryType.Payment, "325041592E5359532E4444463031");
- ceAdapter.RegisterAid(NfcSecureElementType.Hce, NfcCardEmulationCategoryType.Other, "325041592E5359532E4444463031");
+ ceAdapter.RegisterAid(NfcSecureElementType.Hce, NfcCardEmulationCategoryType.Other, "325041592E5359532E44444630312");
IEnumerable<NfcRegisteredAidInformation> hcePaymentAids1 = ceAdapter.GetRegisteredAidInformation(NfcSecureElementType.Hce, NfcCardEmulationCategoryType.Payment);
Assert.IsInstanceOf<IEnumerable<NfcRegisteredAidInformation>>(hcePaymentAids1, "GetRegisteredAidInformation return value is not of the type NfcRegisteredAidInformation");
Assert.IsInstanceOf<IEnumerable<NfcRegisteredAidInformation>>(hceOtherAids1, "GetRegisteredAidInformation return value is not of the type NfcRegisteredAidInformation");
foreach (NfcRegisteredAidInformation aidInformation in hceOtherAids1)
{
- Assert.IsTrue(aidInformation.Aid == "325041592E5359532E4444463031", "aid is not equal to PPSE aid");
+ Assert.IsTrue(aidInformation.Aid == "325041592E5359532E44444630312", "aid is not equal to PPSE aid");
Assert.IsTrue(aidInformation.SeType == NfcSecureElementType.Hce, "se type is not equal to HCE");
hceOtherAidsCount++;
hceOtherAidsCount = 0;
ceAdapter.UnregisterAid(NfcSecureElementType.Hce, NfcCardEmulationCategoryType.Payment, "325041592E5359532E4444463031");
- ceAdapter.UnregisterAid(NfcSecureElementType.Hce, NfcCardEmulationCategoryType.Other, "325041592E5359532E4444463031");
+ ceAdapter.UnregisterAid(NfcSecureElementType.Hce, NfcCardEmulationCategoryType.Other, "325041592E5359532E44444630312");
IEnumerable<NfcRegisteredAidInformation> hcePaymentAids2 = ceAdapter.GetRegisteredAidInformation(NfcSecureElementType.Hce, NfcCardEmulationCategoryType.Payment);
foreach (NfcRegisteredAidInformation aidInformation in hcePaymentAids2)
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MAC")]
[Property("AUTHOR", "Gowtham, gowtham.ab@samsung.com")]
- public static void GetRegisteredAidInformation_METHOD_RETURN_WITH_ESE()
+ public void GetRegisteredAidInformation_METHOD_RETURN_WITH_ESE()
{
try
{
NfcCardEmulationAdapter ceAdapter = NfcManager.GetCardEmulationAdapter();
ceAdapter.RegisterAid(NfcSecureElementType.EmbeddedSE, NfcCardEmulationCategoryType.Payment, "325041592E5359532E4444463031");
- ceAdapter.RegisterAid(NfcSecureElementType.EmbeddedSE, NfcCardEmulationCategoryType.Other, "325041592E5359532E4444463031");
+ ceAdapter.RegisterAid(NfcSecureElementType.EmbeddedSE, NfcCardEmulationCategoryType.Other, "325041592E5359532E44444630312");
IEnumerable<NfcRegisteredAidInformation> esePaymentAids1 = ceAdapter.GetRegisteredAidInformation(NfcSecureElementType.EmbeddedSE, NfcCardEmulationCategoryType.Payment);
Assert.IsInstanceOf<IEnumerable<NfcRegisteredAidInformation>>(esePaymentAids1, "GetRegisteredAidInformation return value is not of the type NfcRegisteredAidInformation");
Assert.IsInstanceOf<IEnumerable<NfcRegisteredAidInformation>>(eseOtherAids1, "GetRegisteredAidInformation return value is not of the type NfcRegisteredAidInformation");
foreach (NfcRegisteredAidInformation aidInformation in eseOtherAids1)
{
- Assert.IsTrue(aidInformation.Aid == "325041592E5359532E4444463031", "aid is not equal to PPSE aid");
+ Assert.IsTrue(aidInformation.Aid == "325041592E5359532E44444630312", "aid is not equal to PPSE aid");
Assert.IsTrue(aidInformation.SeType == NfcSecureElementType.EmbeddedSE, "se type is not equal to HCE");
eseOtherAidsCount++;
eseOtherAidsCount = 0;
ceAdapter.UnregisterAid(NfcSecureElementType.EmbeddedSE, NfcCardEmulationCategoryType.Payment, "325041592E5359532E4444463031");
- ceAdapter.UnregisterAid(NfcSecureElementType.EmbeddedSE, NfcCardEmulationCategoryType.Other, "325041592E5359532E4444463031");
+ ceAdapter.UnregisterAid(NfcSecureElementType.EmbeddedSE, NfcCardEmulationCategoryType.Other, "325041592E5359532E44444630312");
IEnumerable<NfcRegisteredAidInformation> esePaymentAids2 = ceAdapter.GetRegisteredAidInformation(NfcSecureElementType.EmbeddedSE, NfcCardEmulationCategoryType.Payment);
foreach (NfcRegisteredAidInformation aidInformation in esePaymentAids2)
/* TEST CODE */
ceAdapter.GetRegisteredAidInformation(0, 0);
- Assert.Fail( "ForeachRegisteredAidInformations method should be make the exception");
+ Assert.Fail("ForeachRegisteredAidInformations method should be make the exception");
}
catch (NotSupportedException)
{
Assert.IsTrue(isNfcSupported == false || isHceSupported == false, "Method throw the NotSupportedException, but Tizen support the Nfc opearation");
+ }\r
+ catch (Exception ex)\r
+ {\r
+ Assert.True(true, "Null Reference Exception occurs. Msg : " + ex.ToString());\r
}
}
}