Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
}
}
-
- [Test]
- [Category("P2")]
- [Description("Open basic channel with null value on AID param, and check Null Reference Exception.")]
- [Property("SPEC", "Tizen.Network.Smartcard.SmartcardSession.OpenBasicChannel M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "Jihoon Jung, jh8801.jung@samsung.com")]
- public void OpenBasicChannel_CHECK_NULL_REFERENCE_EXCEPTION()
- {
- /*
- * TEST CODE
- */
- try
- {
- readers = SmartcardManager.GetReaders();
-
- foreach (SmartcardReader reader in readers)
- {
- if (reader.IsSecureElementPresent == false)
- {
- Assert.True(false, "SecureElement is not present on the reader with the name, " + reader.Name);
- return;
- }
-
- SmartcardSession session = reader.OpenSession();
- byte[] aid = null;
- byte p2 = 0x00;
-
- session.OpenBasicChannel(aid, p2);
- }
- }
- catch (NotSupportedException)
- {
- Assert.IsTrue(isSupported == false, "Method throw the NotSupportedException, but Tizen support the Smartcard opearation");
- }
- catch (NullReferenceException ex)
- {
- Assert.True(true, "Null Reference Exception occurs. Msg : " + ex.ToString());
- }
- }
-
- [Test]
- [Category("P2")]
- [Description("Open logical channel with null value on AID param, and check Null Reference Exception.")]
- [Property("SPEC", "Tizen.Network.Smartcard.SmartcardSession.OpenLogicalChannel M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "Jihoon Jung, jh8801.jung@samsung.com")]
- public void OpenLogicalChannel_CHECK_NULL_REFERENCE_EXCEPTION()
- {
- /*
- * TEST CODE
- */
- try
- {
- readers = SmartcardManager.GetReaders();
-
- foreach (SmartcardReader reader in readers)
- {
- if (reader.IsSecureElementPresent == false)
- {
- Assert.True(false, "SecureElement is not present on the reader with the name, " + reader.Name);
- return;
- }
-
- SmartcardSession session = reader.OpenSession();
- byte[] aid = null;
- byte p2 = 0x00;
-
- session.OpenLogicalChannel(aid, p2);
- }
- }
- catch (NotSupportedException)
- {
- Assert.IsTrue(isSupported == false, "Method throw the NotSupportedException, but Tizen support the Smartcard opearation");
- }
- catch (NullReferenceException ex)
- {
- Assert.True(true, "Null Reference Exception occurs. Msg : " + ex.ToString());
- }
- }
}
}