public StockSymbol(String symbol)
public String getName()
public abstract Quote getQuote()
public java.awt.Component getVisualComponent()
public StockSymbol(String symbol)
Domain testing of input and output conditions, and external
pre-conditions for class StockSymbol,
constructor public StockSymbol(String symbol)
.
symbol | Expected results | Test Case ID |
---|---|---|
Some String | Creates a new StockSymbol object with the name specified | StockSymbol2001 |
null | throws NullPointerException | StockSymbol2002 |
symbol | Expected results | Test Case ID |
---|---|---|
Empty String, String of size 1 | Creates a new StockSymbol object with the name specified | StockSymbol2001 |
Assertion | Expected result | Test Case ID |
---|---|---|
Creates a new StockSymbol object | StockSymbol(symbol).getName().compareTo(symbol) == 0 | StockSymbol2001 |
NullPointerException - if the specified symbol is null. | NullPointerException | StockSymbol2002 |
Test cases included:
StockSymbol2001,
StockSymbol2002.
title | public StockSymbol(String symbol) and public String getName() tests |
source | CtorNameTests.java SSymbol.java |
executeClass | com.sun.tdk.sampletck.tests.api.StockSymbol.CtorNameTests |
public String getName()
Domain testing of input and output conditions, and external
pre-conditions for class StockSymbol,
method public String getName()
.
Assertion | Expected result | Test Case ID |
---|---|---|
Returns the name of the stock | StockSymbol(symbol).getName() return 'symbol' | StockSymbol2001 |
public abstract Quote getQuote()
Domain testing of input and output conditions, and external
pre-conditions for class StockSymbol,
method public abstract Quote getQuote()
.
Assertion | Test Case ID |
---|---|
Gets the current quote of the stock. | StockSymbol2005 |
Throws: GetQuoteException - if an i/o exception occurs during stock retrieval | StockSymbol2005 |
Test cases included:
StockSymbol2003,
StockSymbol2004,
StockSymbol2005.
title | public java.awt.Component getVisualComponent() and public abstract Quote getQuote() tests |
source | GetXXXTests.java SSymbol.java |
executeClass | com.sun.tdk.sampletck.tests.api.StockSymbol.GetXXXTests |
public java.awt.Component getVisualComponent()
Domain testing of input and output conditions, and external
pre-conditions for class StockSymbol,
method public java.awt.Component getVisualComponent()
.
Pre-conditions | Expected output value | Test Case ID |
---|---|---|
getQuote() returns some Quote | java.awt.Component object | StockSymbol2005 |
getQuote() throws GetQuoteException | java.awt.Component object | StockSymbol2005 |
Assertion | Expected result | Test Case ID |
---|---|---|
The quote info is obtained using getQuote method. | SSymbol.getQuoteCalled will set to true | StockSymbol2003 |
Component returned by a getVisualComponent() method initially invisible and is not added to any container | returned component has parent set to null and is invisible | StockSymbol2004 |
The same container will be returned for each repetitive call. | StockSymbol2005 |