Test Specifications and Descriptions for QuoteAgent

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)

Description

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).

Equivalence Class Partitioning

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 testing

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 Descriptions

Test cases included:
QuoteAgent2001, QuoteAgent2002, QuoteAgent2003.

title QuoteAgent.getStock() method tests
source getStockTests.java
executeClass com.sun.tdk.sampletck.tests.api.QuoteAgent.getStockTests


Last updated: 02/02/15
Copyright © 2002 Sun Microsystems, Inc. All rights reserved.
SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.