Quote agent interface. Represents an abstract agent requesting the stock information from a particular source (such as NYSE or NASDAQ).
public com.sun.tdk.sampleapi.StockSymbol getStock(java.lang.String symbol)
Domain testing of input and output conditions, and external
pre-conditions for class QuoteAgent,
method public com.sun.tdk.sampleapi.StockSymbol getStock(java.lang.String symbol)
.
symbol | Expected output value | Test Case ID |
---|---|---|
valid symbol name | valid StockSymbol object | QuoteAgent2001 |
invalid symbol name | null as a StockSymbol object | QuoteAgent2002 |
null | NullPointerException | QuoteAgent2003 |
Assertion | Test Case ID |
---|---|
Gets a StockSymbol object for the specified symbol. | QuoteAgent2001 |
Returns null if the symbol is unknown to this agent. | QuoteAgent2002 |
Throws java.lang.NullPointerException - if the specified symbol is null. | QuoteAgent2003 |
Test cases included:
QuoteAgent2001,
QuoteAgent2002,
QuoteAgent2003.
title | QuoteAgent.getStock() method tests |
source | getStockTests.java |
executeClass | com.sun.tdk.sampletck.tests.api.QuoteAgent.getStockTests |