Export (0) Print
Expand All

Installing and Running

System Requirements

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

Running the Reference Implementation

Ff921084.note(en-us,PandP.20).gifNote:
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 desktop version or the Silverlight version of the Stock Trader RI

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

    Desktop & Silverlight - Open RI - StockTrader Reference Implementation.bat

  2. Do one of the following:
    • If you want to run the desktop version, expand the Desktop folder, right-click the StockTraderRI project, and then click Set as StartUp Project.
    • If you want to run the Silverlight version, expand the Silverlight folder, right-click the StockTraderRI.Silverlight project, and then click Set as StartUp Project.
  3. Press F5.

To run the desktop version of the Stock Trader RI (excluding Silverlight projects)

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

    Desktop only - Open RI - StockTrader Reference Implementation.bat

  2. Press F5.

To see the pie chart and line chart for each stock

  1. Click the Position tab.
  2. In the Position table, 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. Click the Position tab.
  2. In the Position table, click a stock in that corresponds to the stock you want to learn more about.
  3. Click a news article. If you click the control in the upper-right corner, a News Reader dialog box opens.

To add a stock to the watch list

  1. In the Add to Watch List box, type the stock symbol for the stock you want to add to the watch list. Valid values include STOCK0 through STOCK9 as the stock symbol.
  2. Press ENTER.

To remove a stock from the watch list

  1. Click the Watch List button.
  2. In the watch list, click the X symbol next to the stock that you want to remove.

To buy or sell shares from a stock

  1. In the Position area, click the + or symbol next to the stock that you want to buy or sell.
  2. In the Buy & Sell area, enter the following:
    1. In the Shares box, type the number of shares you want to buy or sell.
    2. In the Price Limit box, type the appropriate price.
    3. In the Order Type drop-down box, click Limit, Market, or Stop.
    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 area and on the main task bar. The Submit All button will be enabled only if all individual orders are able to be submitted.

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

Ff921084.b35db9f0-74c7-4dbd-ac1a-ccea84a7a957(en-us,PandP.20).png

Figure 1

Buy & Sell area 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 download the White assemblies. For more information about White, including download information, see White on CodePlex. On the Releases tab, download release 0.1.5.0.

Ff921084.note(en-us,PandP.20).gifNote:
The acceptance tests have been developed and verified with the White 0.1.5.0 release. Although other releases of White might work, it is recommended to use this release to avoid any issues when running the tests.

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.Tests.AcceptanceTest\StockTraderRI.Tests.AcceptanceTest.sln.
  3. Right-click the StockTraderRI.Tests.AcceptanceTest 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 interact with the application. At the end of the test pass, you should see that all tests have passed.

More Information

To learn more about specific aspects of the Composite Application Guidance, you can run and review the following QuickStarts:



Home page on MSDN | Community site

Show:
© 2014 Microsoft