/TestSuite/bin/Debug/TestSuite.XML
XML | 399 lines | 399 code | 0 blank | 0 comment | 0 complexity | 399d6bf4a34935f90f5641313b218fe2 MD5 | raw file
Possible License(s): GPL-2.0
- <?xml version="1.0"?>
- <doc>
- <assembly>
- <name>TestSuite</name>
- </assembly>
- <members>
- <member name="T:TestSuite.APITestSuite">
- <summary>
- This class has one static function which activates the test suite.
- </summary>
- <remarks>
- For all tests, the test description that appears on the screen is the
- function that is the specific target of the test. Use the test description
- and the Error code, along with the following summaries of tests to debug
- if a test fails. If a function ever fails, a Debug.Assert is placed in the
- code to tell the user where and allow them to examine why it may have
- failed. Also, the function returns when a test fails to allow the user to
- exit the application if that happens.
- </remarks>
- <example>
- This is an example of how to implement the test suite in an application.
- <code>
- Text pinText;
- int counter = 1;
- ...
- // Create timer object to allow for output while test is running
- DispatcherTimer timer.Interval = new TimeSpan(0, 0, 0, 0, 200);
- timer.Start();
- // Activate test suite in separate thread
- Thread PushedButton = new Thread(new ThreadStart(TestSuite.ActivateTestSuite));
- PushedButton.Start();
- ...
- static void timer_Tick(object sender, EventArgs e)
- {
- // If test is still running
- if (PushedButton.IsAlive)
- {
- // If a test has recently completed
- if (TestSuite.DisplayToScreen)
- {
- // If the most recent display to screen was not actually
- // a test, no need to display information again
- if (TestSuite.Test2Info.Substring(0, 3).Equals("All"))
- {
- pinText.TextContent = "";
- }
- // If first test, display initial test statement
- else if (counter == 0)
- {
- pinText.TextContent = TestSuite.Test2Info;
- counter++;
- }
- // Else, display that the most recent test passed.
- else
- {
- pinText.TextContent = "Test " + counter++.ToString()
- + " passed which tested\n" + TestSuite.Test2Info;
- }
- //If info was being passed instead of undergoing test display information
- if (TestSuite.TestInfo.Substring(0, 3).Equals("All"))
- {
- pinText.TextContent += "\n\n" + TestSuite.TestInfo;
- }
- // Otherwise a test was passed, so display message
- else
- {
- pinText.TextContent += "\n\nRunning test " + counter.ToString()
- + " which tests\n" + TestSuite.TestInfo;
- }
- TestSuite.DisplayToScreen = false;
- }
- }
- // All tests were passed, continue with application
- else if (TestSuite.TestInfo == "All tests passed")
- {
- // Continue with application
- }
- // A test failed, output necessary information and exit application
- else
- {
- SCardError err = SCard.GetError();
- pinText.TextContent = "Test " + counter.ToString() + " failed which tested\n"
- + TestSuite.TestInfo + "\nExiting application"
- + "\nError: " + SCard.StringifyError(err);
- myApplication.Shutdown();
- }
- }
- </code>
- </example>
- </member>
- <member name="M:TestSuite.APITestSuite.ActivateTestSuite">
- <summary>
- This function calls the specific tests, updates the
- testing information for output, tells the user when to output,
- and pauses after each test.
- </summary>
- <remarks>
- This test suite does not test a working Control command, as that
- is a reader specific test. It is advised that Control is tested
- in order to insure correctness.
- </remarks>
- </member>
- <member name="M:TestSuite.APITestSuite.ChangeStatus">
- <summary>
- Function used to call GetStatusChange in separate Thread
- </summary>
- </member>
- <member name="M:TestSuite.APITestSuite.Test01">
- <summary>
- Test 1: EstablishContext
- </summary>
- <remarks>
- Establish 2 contexts. Create third context using constructor.
- If error occurs here, it would occur in SCard.EstablishContext
- function or Device.ConnectReader.
- </remarks>
- <returns>True if test passes, false otherwise</returns>
- </member>
- <member name="M:TestSuite.APITestSuite.Test02">
- <summary>
- Test 2: ReleaseContext
- </summary>
- <remarks>
- Release 1 context. If error occurs here, it would occur
- in SCard.ReleaseContext.
- </remarks>
- <returns>True if test passes, false otherwise</returns>
- </member>
- <member name="M:TestSuite.APITestSuite.Test03">
- <summary>
- Test 3: IsValidContext
- </summary>
- <remarks>
- Check if all created contexts are valid along with a null context.
- If error occurs here, it would occur in SCard.EstablishContext,
- SCard.ReleaseContext (are not functioning properly) or
- SCard.IsValidContext.
- </remarks>
- <returns>True if test passes, false otherwise</returns>
- </member>
- <member name="M:TestSuite.APITestSuite.Test04">
- <summary>
- Test 4: ReleaseContext
- </summary>
- <remarks>
- Release all created contexts along with a null context. If error occurs
- here, it would occur in SCard.EstablishContext (is not functioning
- properly), SCard.ReleaseContext or Device.DisconnectReader. After test 4,
- assume that all of the above tested functions are working properly.
- </remarks>
- <returns>True if test passes, false otherwise</returns>
- </member>
- <member name="M:TestSuite.APITestSuite.Test05">
- <summary>
- Test 5: GetStatusChange
- </summary>
- <remarks>
- Call GetStatusChange on context that was created using constructor.
- Then call GetStatusChange with invalid timeout value. Then call
- GetStatusChange on valid context with timeout 0. If error occurs here,
- it would occur in SCard.GetStatusChange, Device.GetStatus or
- Device.UpdateStatus (if implemented).
- </remarks>
- <returns>True if test passes, false otherwise</returns>
- </member>
- <member name="M:TestSuite.APITestSuite.Test06">
- <summary>
- Test 6: GetStatusChange
- </summary>
- <remarks>
- Call GetStatusChange on valid context with timeout 100 to test that
- GetStatusChange will return eventually if given a timeout value not
- equal to infinite. If error occurs here, it would occur in
- SCard.GetStatusChange, Device.GetStatus or Device.UpdateStatus
- (if implemented).
- </remarks>
- <returns>True if test passes, false otherwise</returns>
- </member>
- <member name="M:TestSuite.APITestSuite.Test07">
- <summary>
- Test 7: GetStatusChange
- </summary>
- <remarks>
- Call GetStatusChange in a new thread with timeout 100, and then in
- current thread call GetStatusChange with same context and different
- context. This tests GetStatusChangeâs ability to block the reader.
- If error occurs here, it would occur in SCard.GetStatusChange,
- Device.GetStatus or Device.UpdateStatus (if implemented).
- </remarks>
- <returns>True if test passes, false otherwise</returns>
- </member>
- <member name="M:TestSuite.APITestSuite.Test08">
- <summary>
- Test 8: GetStatusChange
- </summary>
- <remarks>
- Call GetStatusChange with timeout 0 to get the current status and prepare
- for test 9. If error occurs here, it would occur in SCard.GetStatusChange,
- Device.GetStatus or Device.UpdateStatus (if implemented).
- </remarks>
- <returns>True if test passes, false otherwise</returns>
- </member>
- <member name="M:TestSuite.APITestSuite.Test09">
- <summary>
- Test 9: GetStatusChange
- </summary>
- <remarks>
- Then if the status is present (or activated), call GetStatusChange with
- timeout infinite twice to force user to remove and then reinsert the card.
- If status is absent, call GetStatusChange with timeout infinite three
- times to force user to insert, then remove and reinsert the card. This
- specifically tests the ability of the reader to notice a present or absent
- card. If error occurs here, it would occur in SCard.GetStatusChange,
- Device.GetStatus or Device.UpdateStatus (if implemented).
- </remarks>
- <returns>True if test passes, false otherwise</returns>
- </member>
- <member name="M:TestSuite.APITestSuite.Test10">
- <summary>
- Test 10: Cancel
- </summary>
- <remarks>
- Call Cancel to make sure it does nothing if GetStatusChange has not
- been called. Then call GetStatusChange, wait for it to finish, and call
- Cancel to make sure it still does nothing. This specifically tests the
- ability of the reader to notice a present or absent card. If error
- occurs here, it would occur in SCard.Cancel.
- </remarks>
- <returns>True if test passes, false otherwise</returns>
- </member>
- <member name="M:TestSuite.APITestSuite.Test11">
- <summary>
- Test 11: Cancel
- </summary>
- <remarks>
- Call GetStatusChange in a new thread. Then call Cancel with the wrong
- context to get an error. Then call Cancel with correct context. If error
- occurs here, it would occur in SCard.Cancel or SCard.GetStatusChange.
- After test 11, assume that Cancel works properly.
- </remarks>
- <returns>True if test passes, false otherwise</returns>
- </member>
- <member name="M:TestSuite.APITestSuite.Test12">
- <summary>
- Test 12: Connect
- </summary>
- <remarks>
- Connect one card with a valid context and one with an invalid context.
- If error occurs here, it would occur in SCard.Connect,
- Device.ActivateCard, or Device.SendPPS.
- </remarks>
- <returns>True if test passes, false otherwise</returns>
- </member>
- <member name="M:TestSuite.APITestSuite.Test13">
- <summary>
- Test 13: Status
- </summary>
- <remarks>
- Call Status on card and GetStatusChange with timeout 0 on the corresponding
- context to verify that the data is the same. If error occurs here, it would
- occur in SCard.Status, SCard.GetStatusChange, Device.GetStatus, or
- Device.UpdateStatus (if implemented).
- </remarks>
- <returns>True if test passes, false otherwise</returns>
- </member>
- <member name="M:TestSuite.APITestSuite.Test14">
- <summary>
- Test 14: Reconnect and Disconnect
- </summary>
- <remarks>
- Call Disconnect and Reconnect on invalid cards. Then Connect a new card,
- Disconnect it with unpower as the Disposition and Reconnect a different
- card. Lastly Connect a new card and Disconnect it to verify functionality
- of Disconnect. If error occurs here, it would occur in SCard.Disconnect,
- SCard.Reconnect, Device.DeactivateCard, or Device.ActivateCard.
- </remarks>
- <returns>True if test passes, false otherwise</returns>
- </member>
- <member name="M:TestSuite.APITestSuite.Test15">
- <summary>
- Test 15: GetStatusChange
- </summary>
- <remarks>
- Call GetStatusChange in a new thread and then verify that it blocks the
- functionality of Connect, Reconnect, Disconnect, and Status. If error
- occurs here, it would occur in SCard.Disconnect, SCard.Reconnect,
- SCard.Connect, SCard.Status, or SCard.GetStatusChange. After test 15,
- assume that Status, Disconnect, and Reconnect, DeactivateCard and
- ActivateCard function properly.
- </remarks>
- <returns>True if test passes, false otherwise</returns>
- </member>
- <member name="M:TestSuite.APITestSuite.Test16">
- <summary>
- Test 16: Begin and End Transaction
- </summary>
- <remarks>
- Connect a new card, and then call EndTransaction to make sure it fails.
- Then call BeginTransaction and EndTransaction right after. If error occurs
- here, it would occur in SCard.BeginTransaction or SCard.EndTransaction.
- </remarks>
- <returns>True if test passes, false otherwise</returns>
- </member>
- <member name="M:TestSuite.APITestSuite.Test17">
- <summary>
- Test 17: Transmit, Control, and StringifyAPDU
- </summary>
- <remarks>
- Call Transmit and then StringifyAPDUResponse on the response. If error
- occurs here, it would occur in SCard.Transmit or SCard.StringifyAPDUResponse,
- Device.SendPPS, or Device.SendAPDU.
- </remarks>
- <returns>True if test passes, false otherwise</returns>
- </member>
- <member name="M:TestSuite.APITestSuite.Test18">
- <summary>
- Test 18: Transmit, Control, and StringifyAPDU
- </summary>
- <remarks>
- Call BeginTransaction, then call Transmit followed by StringifyAPDUResponse
- on the same card, then Transmit and StringifyAPDUResponse on a different card,
- and then Control on a different card. Then call EndTransaction. If error
- occurs here, it would occur in SCard.BeginTransaction, SCard.EndTransaction,
- SCard.Transmit, SCard.StringifyAPDUResponse, SCard.Control, Device.SendPPS,
- or Device.SendAPDU.
- </remarks>
- <returns>True if test passes, false otherwise</returns>
- </member>
- <member name="M:TestSuite.APITestSuite.Test19">
- <summary>
- Test 19: Transmit, Control, and StringifyAPDU
- </summary>
- <remarks>
- Call Transmit on both cards to verify that the transaction was actually
- ended. If error occurs here, it would occur in SCard.Transmit or
- SCard.EndTransaction, Device.SendPPS, or Device.SendAPDU.
- </remarks>
- <returns>True if test passes, false otherwise</returns>
- </member>
- <member name="M:TestSuite.APITestSuite.Test20">
- <summary>
- Test 20: GetStatusChange
- </summary>
- <remarks>
- Call GetStatusChange in a new thread and then verify that it blocks the
- functionality of BeginTransaction, EndTransaction, Control, and Transmit.
- If error occurs here, it would occur in SCard.BeginTransaction,
- SCard.EndTransaction, SCard.Control, SCard.Transmit, or SCard.GetStatusChange.
- </remarks>
- <returns>True if test passes, false otherwise</returns>
- </member>
- <member name="M:TestSuite.APITestSuite.Test21">
- <summary>
- Test 21: BeginTransaction
- </summary>
- <remarks>
- Call BeginTransaction and then verify that it blocks the functionality
- of Transmit, Control, Status, GetStatusChange, Connect, Disconnect, and
- Reconnect on another card. Then call EndTransaction. If error occurs
- here, it would occur in SCard.BeginTransaction, SCard.Control,
- SCard.Transmit, SCard.Connect, SCard.Disconnect, SCard.Reconnect,
- SCard.Status, SCard.GetStatusChange, or SCard.EndTransaction.
- </remarks>
- <returns>True if test passes, false otherwise</returns>
- </member>
- <member name="M:TestSuite.APITestSuite.Test22">
- <summary>
- Test 22: Connect
- </summary>
- <remarks>
- Call Connect with exclusive rights and then verify that it blocks the
- functionality of BeginTransaction, Transmit, Control, Status,
- GetStatusChange, Connect, Disconnect, and Reconnect, EndTransaction
- another card. Then call Transmit to verify that Connect with exclusive
- rights allows itself to Transmit APDUs. If error occurs here, it would
- occur in SCard.Connect, SCard.BeginTransaction, SCard.Control,
- SCard.Transmit, SCard.Disconnect, SCard.Reconnect, SCard.Status,
- SCard.GetStatusChange, or SCard.EndTransaction. After test 22, assume
- that all tested functions work properly.
- </remarks>
- <returns>True if test passes, false otherwise</returns>
- </member>
- <member name="P:TestSuite.APITestSuite.TestInfo">
- <summary>
- Get information on current test
- </summary>
- </member>
- <member name="P:TestSuite.APITestSuite.Test2Info">
- <summary>
- Get information on most recent test
- </summary>
- </member>
- <member name="P:TestSuite.APITestSuite.DisplayToScreen">
- <summary>
- Get whether test has just been passed
- </summary>
- </member>
- </members>
- </doc>