Share via


Installing and Running

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

System Requirements

The reference implementation requires Visual Studio 2008 and the .NET Framework 3.5.

Running the Reference Implementation

Note

For security reasons, Internet Explorer might block files you download from the Internet, including the .zip file of this release. Running the application's unit tests when the files are blocked may result in security exceptions. To avoid this, you need to unblock the release .zip file before extracting it. To unblock the .zip file, in Windows Explorer, right-click the file name, and then click Properties. On the General tab, click the Unblock button, and then click OK.

To run the Stock Trader RI

  1. In Windows Explorer, double-click the following batch file to open the solution in Visual Studio:

    Open RI-StockTrader Reference Implementation Solution.bat

  2. Press F5.

To see the pie chart and line chart for each stock

  • On the Position tab, click the row that corresponds to the stock whose pie chart and line chart you want to see.

To see a news item corresponding to a stock

  1. On the Position tab, click a stock in that corresponds to the stock you want to learn more about.
  2. Click a news article; this opens a News Reader dialog box.

To add a stock to the watch list

  1. In the text box next to the Add To Watch List button, type the symbol for the stock. For example, type Stock9 in the box.
  2. Click the Add To Watch List button.

To remove a stock from the watch list

  • Under Watch List, right-click the stock you want to remove, and then click Remove.

To buy or sell shares from a stock

  1. On the Position tab, right-click** **the stock you want to buy or sell, and then click Buy or Sell.
  2. On the Buy & Sell tab, enter the following:.
    1. In the Order Type drop-down box, click Limit, Market, or Stop.
    2. In the Shares box, type the number of shares you want to buy or sell.
    3. In the Price Limit box, type the appropriate price.
    4. In the Term box, click End of day or Thirty days. Term is the length of time an order will be active before it is carried out or it expires.
  3. To submit the order, click the Submit button. To cancel the order, click the Cancel button.

To submit or cancel all your buy and sell orders

  • If you have multiple orders that are ready to be bought or sold, the Submit All and Cancel All buttons are enabled on the Buy & Sell tab and on the main task bar. Only the orders whose Submit or Cancel buttons are enabled will be executed in the Submit All or Cancel All process.

Figure 1 shows the Stock Trader RI Buy & Sell tab.

Ff921084.34e45bf3-c5d4-4759-8169-7f87130d5f92(en-us,PandP.10).png

Figure 1
Buy & Sell tab in the Stock Trader RI

Acceptance Tests

The Stock Trader RI includes a separate solution that includes acceptance tests. The acceptance tests describe how the reference implementation should perform when you follow a series of steps. You can use the acceptance tests to explore the functional behavior of the application in a variety of scenarios.

Some acceptance tests were developed using the testing framework White. To run these tests, you need to have White installed. For more information about White, including download information, see White on CodePlex. On the Releases tab, download release 0.14.

To run the Stock Trader RI acceptance tests

  1. Place the White assemblies in the folder Source\Lib\White. The White assembles are the following:
    • Bricks.dll
    • Bricks.RuntimeFramework.dll
    • Castle.Core.dll
    • Castle.DynamicProxy2.dll
    • Core.dll
    • log4net.config
    • log4net.dll
    • nunit.framework.dll
    • White.NUnit.dll
    • Xstream.Core.dll
  2. In Visual Studio, open the solution file StockTraderRI\StockTraderRI_AcceptanceTests.sln.
  3. Right-click the StockTraderRI.Tests.AcceptanceTests project, and then click Set as StartUp Project.
  4. Press F5.

Outcome

You should see the Stock Trader RI Shell window and the tests automatically fill in the information. At the end of the test pass, you should see that 49 tests have passed.

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.