public void TestDefinedStockRemove()
        {
            IDefinedStockContainer definedStockContainer = StockContainerCreator.GetDefinedStockContainer();

            definedStockContainer.Add(new Stock()
            {
                Name = "AAPL", ID = "AAPL"
            });
            definedStockContainer.Add(new Stock()
            {
                Name = "BIOX", ID = "BIOX"
            });
            definedStockContainer.Add(new Stock()
            {
                Name = "GHM", ID = "GHM"
            });
            definedStockContainer.Add(new Stock()
            {
                Name = "PALL", ID = "PALL"
            });
            definedStockContainer.Add(new Stock()
            {
                Name = "TRTY", ID = "TRTY"
            });
            definedStockContainer.Remove("AAPL");
            Assert.IsTrue(4 == definedStockContainer.Stocks.Count);
        }
Exemple #2
0
        public StockView()
        {
            InitializeComponent();

            //define dependencies
            definedStockContainer           = StockContainerCreator.GetDefinedStockContainer();
            definedStockContainer.OnAdd    += onStockAdded;
            definedStockContainer.OnRemove += onStockRemoved;

            //fetch saved Stocks

            stockUpdater         = StockUpdaterFactory.Create();
            stockUpdater.Notify += OnNotified;

            //_stockStore = StockStoreFactory.GetStockStore();
            LoadFrequency();
        }
 public DefineStockView()
 {
     InitializeComponent();
     srch = StockSearchFactory.GetSearchEntity();
     definedStockContainer = StockContainerCreator.GetDefinedStockContainer();
 }
Exemple #4
0
 public StockRemoveView()
 {
     InitializeComponent();
     definedStockContainer = StockContainerCreator.GetDefinedStockContainer();
     LoadStocks();
 }