예제 #1
0
        private IRepository <StockModel> GetStockRepositoryMock()
        {
            var repo = new StockRepository();

            repo.AddItem(new StockModel()
            {
                Type = StockType.Bond, MarketValue = Convert.ToDecimal(2.00 * 2), Price = Convert.ToDecimal(2.00), Quantity = 2, StockWeight = 1
            });
            repo.AddItem(new StockModel()
            {
                Type = StockType.Bond, MarketValue = Convert.ToDecimal(2.00 * 2), Price = Convert.ToDecimal(2.00), Quantity = 2, StockWeight = 1
            });
            repo.AddItem(new StockModel()
            {
                Type = StockType.Bond, MarketValue = Convert.ToDecimal(2.00 * 2), Price = Convert.ToDecimal(2.00), Quantity = 2, StockWeight = 1
            });
            repo.AddItem(new StockModel()
            {
                Type = StockType.Equity, MarketValue = Convert.ToDecimal(2.00 * 2), Price = Convert.ToDecimal(2.00), Quantity = 2, StockWeight = 1
            });

            return(repo);
        }