index.html.svn-base
来自「cqME :java framework for TCK test.」· SVN-BASE 代码 · 共 544 行 · 第 1/2 页
SVN-BASE
544 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- $Id$ Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 only, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License version 2 for more details (a copy is included at /legal/license.txt). You should have received a copy of the GNU General Public License version 2 along with this work; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, CA 95054 or visit www.sun.com if you need additional information or have any questions.--><HTML><HEAD><TITLE>Test Specifications and Descriptions for StockInfoManager</TITLE></HEAD><BODY><H1>Test Specifications and Descriptions for StockInfoManager</H1><P>StockInfoManager is an entry point to the Sample API. Its getStock method is used to create a StockSymbol object which in turn can be used to retrieve a quote.<P><HR><UL> <LI><A HREF="#addQuoteAgent(QuoteAgent)"><BIG><CODE>public void addQuoteAgent(QuoteAgent agent)</CODE></BIG></A> <LI><A HREF="#getDefault()"><BIG><CODE>public static StockInfoManager getDefault()</CODE></BIG></A> <LI><A HREF="#getQuoteAgents()"><BIG><CODE>public java.util.Enumeration getQuoteAgents()</CODE></BIG></A> <LI><A HREF="#getStock(java.lang.String)"><BIG><CODE>public StockSymbol getStock(java.lang.String symbol)</CODE></BIG></A> <LI><A HREF="#removeQuoteAgent(QuoteAgent)"><BIG><CODE>public void removeQuoteAgent(QuoteAgent agent)</CODE></BIG></A> <LI><A HREF="#setDefault(StockInfoManager)"><BIG><CODE>public static void setDefault(StockInfoManager newDefault)</CODE></BIG></A></UL><P><HR><H3><A NAME="addQuoteAgent(QuoteAgent)"><CODE>public void addQuoteAgent(QuoteAgent agent)</CODE></A></H3><H4>Description</H4><P>Domain testing of input and output conditions, and externalpre-conditions for class StockInfoManager,method <CODE>public void addQuoteAgent(QuoteAgent agent)</CODE>.<H4>Equivalence Class Partitioning</H4><TABLE BORDER=1 SUMMARY="Test case documentation table"> <TR> <TH> Pre-conditions <TH> agent <TH> Expected results <TH> Test Case ID <TR> <TD> StockInfoManager lookup table is empty <TD> some QuoteAgent object <TD> StockInfoManager lookup table should contain one reference to agent, this table size should be equal to 1 <TD> StockInfoManager2002 <TR> <TD> StockInfoManager lookup table contains agent <TD> some QuoteAgent that was previously added <TD> StockInfoManager lookup table should contain at least 1 reference to agent <TD> StockInfoManager2002 <TR> <TD> agent was previously added and then removed from the StockInfoManager lookup table. (This table is not empty) <TD> some QuoteAgent object <TD> StockInfoManager lookup table should contain at least one reference to agent <TD> StockInfoManager2002 <TR> <TD> <TD> null <TD> NullPointerException should be thrown <TD> StockInfoManager2003</TABLE><H4>Boundary Value Analysis</H4><TABLE BORDER=1 SUMMARY="Test case documentation table"> <TR> <TH> Pre-conditions <TH> agent <TH> Expected results <TH> Test Case ID <TR> <TD> StockInfoManager lookup table size equal to 1, it contains a reference to agent. <TD> some QuoteAgentObject <TD> StockInfoManager lookup table should contain at least 1 reference to agent; this table size should be greater than or equal to 1. <TD> StockInfoManager2002 <TR> <TD> StockInfoManager lookup table size equal to 1, it doesn't contain agent. <TD> some QuoteAgent object <TD> StockInfoManager lookup table should contain at least 1 reference to agent;this table size should be greater than 1. <TD> StockInfoManager2002</TABLE><H4>Assertion testing</H4><TABLE BORDER=1 SUMMARY="Test case documentation table"> <TR> <TH> Assertion <TH> Test Case ID <TR> <TD> Adds a QuoteAgent to the StockInfoManager lookup table <TD> StockInfoManager2002 <TR> <TD> If the StockInfoManager lookup table contains a QuoteAgent passed, calling this method has no effect. <TD> StockInfoManager2002 <TR> <TD> NullPointerException - if specified agent is null <TD> StockInfoManager2003</TABLE><H4>Test Descriptions</H4>See:<BR><A HREF="#AddRemove">Test descriptions</A> for AddRemoveTests.java (StockInfoManager2002, StockInfoManager2003)<P><HR><H3><A NAME="getDefault()"><CODE>public static StockInfoManager getDefault()</CODE></A></H3><H4>Description</H4><P>Domain testing of input and output conditions, and externalpre-conditions for class StockInfoManager,method <CODE>public static StockInfoManager getDefault()</CODE>.<H4>Assertion testing</H4><TABLE BORDER=1 SUMMARY="Test case documentation table"> <TR> <TH> Pre-conditions <TH> Assertion <TH> Test Case ID <TR> <TD> There have not been the default StockInfoManager set. <TD> returns default StockInfoManager (may be null) <TD> StockInfoManager2005 <TR> <TD> Some StockInfoManager (not null) is set. <TD> returns default StockInfoManager <TD> StockInfoManager2005 <TR> <TD> null StockInfoManager is set. <TD> returns null <TD> StockInfoManager2005 <TR> <TD> <TD> Gets the default StockInfoManager. This may be null. <TD> StockInfoManager2006</TABLE><H4>Test Descriptions</H4><A NAME="SetGetDef"></A><P>Test cases included:<br> StockInfoManager2005, StockInfoManager2006.<P><TABLE BORDER=1 SUMMARY="Javatest Test Description" CLASS=TestDescription> <THEAD><TR><TH SCOPE="col">Item</TH><TH SCOPE="col">Value</TH></TR></THEAD> <TR> <TD> <B>title</B> <TD> public static void setDefault(StockInfoManager newDefault) method tests <TR> <TD> <B>source</B> <TD> <A HREF="SetGetDefTests.java">SetGetDefTests.java</A> <A HREF="StockTest.java">StockTest.java</A> <TR> <TD> <B>executeClass</B> <TD> com.sun.tdk.sampletck.api.com.sun.tdk.sampleapi.StockInfoManager.SetGetDefTests <TR> <TD> <B>executeArgs</B> <TD> -msgSwitch $testMsgSwitch -serverPort $serverPort <TR> <TD> <B>remote</B> <TD> networkAgent: com.sun.tdk.sampletck.api.com.sun.tdk.sampleapi.StockInfoManager.SampleStockSource -msgSwitch $testMsgSwitch <TR> <TD> <B>remoteSource</B> <TD> SampleStockSource.java </TD> <TR> <TD> <B>keywords</B> </TD> <TD> runtime positive distributed</TD></TABLE><P><HR><H3><A NAME="getQuoteAgents()"><CODE>public java.util.Enumeration getQuoteAgents()</CODE></A></H3><H4>Description</H4><P>Domain testing of input and output conditions, and externalpre-conditions for class StockInfoManager,method <CODE>public java.util.Enumeration getQuoteAgents()</CODE>.<H4>Equivalence Class Partitioning</H4><TABLE BORDER=1 SUMMARY="Test case documentation table"> <TR> <TH> Pre-conditions <TH> Expected output value <TH> Test Case ID <TR> <TD> StockInfoManager lookup table is empty <TD> empty Enumeration <TD> StockInfoManager2007 <TR> <TD> StockInfoManager lookup table is not empty <TD> an enumeration of all installed QuoteAgents in the same order they were added to the StockInfoManager <TD> StockInfoManager2007</TABLE><H4>Boundary Value Analysis</H4><TABLE BORDER=1 SUMMARY="Test case documentation table"> <TR> <TH> Pre-conditions <TH> Expected output value <TH> Test Case ID <TR> <TD> StockInfoManager lookup table size equals to 1 <TD> an enumeration of single QuoteAgent <TD> StockInfoManager2007</TABLE><H4>Assertion testing</H4><TABLE BORDER=1 SUMMARY="Test case documentation table"> <TR> <TH> Assertion <TH> Test Case ID <TR> <TD> Gets an enumeration of all installed QuoteAgents in the same order they were added to the StockInfoManager. <TD> StockInfoManager2007 <TR> <TD> removeQuoteAgent(agent) doesn't change the order in lookup table. <TD> StockInfoManager2007 <TR> <TD> addQuoteAgent(agent) doesn't change the order in lookup table. <TD> StockInfoManager2007</TABLE><H4>Test Descriptions</H4><A NAME="GetQuoteAgents"></A><P>Test cases included:<br> StockInfoManager2007.<P><TABLE BORDER=1 SUMMARY="Javatest Test Description" CLASS=TestDescription> <THEAD><TR><TH SCOPE="col">Item</TH><TH SCOPE="col">Value</TH></TR></THEAD> <TR> <TD> <B>title</B> <TD> public java.util.Enumeration getQuoteAgents() method tests <TR> <TD> <B>source</B> <TD> <A HREF="GetQuoteAgentsTests.java">GetQuoteAgentsTests.java</A> <A HREF="StockTest.java">StockTest.java</A> <A HREF="Checker.java">Checker.java</A> <TR> <TD> <B>executeClass</B> <TD> com.sun.tdk.sampletck.api.com.sun.tdk.sampleapi.StockInfoManager.GetQuoteAgentsTests <TR> <TD> <B>executeArgs</B> <TD> -msgSwitch $testMsgSwitch -serverPort $serverPort <TR>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?