Пример #1
0
        public void GetProfitLoss()
        {
            OrderItemManager om = new OrderItemManager();

            Assert.AreEqual(om.GetProfitLoss(), 0);
            om.AddItem(new Item("13", 14, 24.0m));
            om.AddDeal(new DealItem(2.0m, new DateTime(2002, 10, 18), new DateTime(2002, 10, 19), "13", 14, 24.0m));
            om.AddOrder(new Order(new DateTime(2002, 10, 18), "13", 12));

            Assert.AreEqual(om.GetProfitLoss(), 51.84);
        }