OpenCard  
 
OCF, the OpenCard Framework is a standard Java framework for working with Smart Cards.  
 

Package opencard.tests.terminal

Interface Summary
CommandCodes Provides parameterization of APDU Command Codes.
 

Class Summary
AskRandom AskRandom defines a simple Get Challenge-Command.
CardEvent The CardEvent.
CloseTerminal The CloseTerminal.
It is derived from the TestBean which provide most of the required functionality. SAMPLE:
CloseTerminal ctb = new CloseTerminal();
ctb.setId("CTTest1");
ctb.initialize(card);
ctb.addExpectedResult(0);
ctb.execute();
CommandBean The CommandBean is the superclass of all CommandBeans, encapsulating a specific Command APDU.
It's superclass TestBean provides test specific features like
- Check if the Result is expected or not (Low-level evaluation)
- Friendly look Log-Outputs/Traces.
CommandCodeFactory A factory class for creating apropriate CommandCode objects for a specific card.
CTTestCase CTTestCase.
Three Entry Points to start the testcase - main() - start() - test()
DirectCommand DirectCommand defines a simple Select-Command.
EraseBinary EraseBinary is derived from the CommandBean which provided most of the required functionality. SAMPLE:
EraseBinary erase = new EraseBinary();
erase.setCardType(CommandCodeFactory.BULL);
erase.initialize(card);
erase.setId("Bull PCSC-Test3-B");
erase.setData(new byte[]{(byte)0x00,(byte)0x78});
erase.addExpectedResult(0x9000);
erase.execute();

GenerateKey GenerateKey is derived from the CommandBean which provide most of the required functionality. SAMPLE:
GenerateKey generate = new GenerateKey();
generate.setCardType(CommandCodeFactory.BULL);
generate.initialize(card);
generate.setId("Bull PCSC-Test4");
generate.setData(new byte[]{(byte)0x12,(byte)0x00});
generate.addExpectedResult(0x9000);
generate.execute();
GetATR The GetATR.
GetResponse GetResponse is derived from the CommandBean which provided most of the required functionality. SAMPLE:
GetResponse response = new GetResponse();
response.setCardType(CommandCodeFactory.BULL);
response.initialize(card);
response.setId("Bull PCSC-Test2");
response.setLength(8);
response.addExpectedResult(0x9000);
response.execute();
OpenTerminal The OpenTerminal.
It is derived from the TestBean which provide most of the required functionality.
SAMPLE:
OpenTerminal otb = new OpenTerminal();
otb.setId("CTTest1");
otb.initialize(com.ibm.opencard.terminal.pcscmig.PcscMigCardTerminalFactory.class,
"IBM Terminal", "PCSCMIG", "");
otb.addExpectedResult(0);
otb.execute();
ReadBinary ReadBinary defines a simple Read-Command.
ReadRecord ReadRecord defines a simple Read Record -Command.
Search Search is derived from the CommandBean which provided most of the required functionality. SAMPLE:
Search search = new Search();
search.setCardType(CommandCodeFactory.BULL);
search.initialize(card);
search.setId("Bull PCSC-Test2");
search.addExpectedResult(0x9000);
search.execute();
Select Select defines a simple Select-Command.
TerminalInfo The TerminalInfo .
TestBean The TestBean is the superclass of all Beans used for the OCF compliance test.
TestThread TestThread - A wrapper class for a TestCases running as a Thread.
ThreadStarter ThreadStarter - A wrapper class to start mulitiple instances of one TestCases in multiple Thread.
UpdateBinary UpdateBinary defines a simple Update-Command.
VerifyCHV VerifyCHV defines a simple Verify CHV-Command.
WaitForCard The WaitForCard retrieves SmartCard objects from defined Slots.
 

Exception Summary
TestFailedException The Exception class to abort a test case.
TestInitException The Exception class to signal, that the initialization of testBean was not successful.