public void Setup()
        {
            tradeRepo = new TradeInstructionRepository();
            helper    = new TradeInstructionHelper();

            helper.Seed(tradeRepo, noOfTradesToSeed);
        }
Ejemplo n.º 2
0
        public void Setup()
        {
            tradeRepo = new TradeInstructionRepository();
            helper    = new TradeInstructionHelper();

            helper.SeedBasicTrades(tradeRepo);
        }
Ejemplo n.º 3
0
        public void Setup()
        {
            tradeRepo = new TradeInstructionRepository();
            helper    = new TradeInstructionHelper();

            helper.SeedBasicTrades(tradeRepo);
            settlementManager = new SettlementInstructionManager(tradeRepo.List);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Generates trades, processes them into settlement instructions and executes reports
        /// </summary>
        private static void Run()
        {
            using (IService service = _serviceProvider.GetService <IService>())
            {
                ITradeInstructionHelper generator = new TradeInstructionHelper();

                generator.Seed(service.TradeRepository, _noOfTradesToGenerate);
                service.ProcessTrades();

                DisplaySettledSell(service);
                Console.Write(Environment.NewLine);

                DisplaySettledBuy(service);
                Console.Write(Environment.NewLine);

                // Was unsure of the wording of the requirements
                //      Ranking of entities based on incoming and outgoing amount.
                //      Eg: If entity foo instructs the highest amount for a buy instruction, then foo is rank 1 for outgoing
                // Have including ranking the entire list regardless of InstructionFlag but have implemented
                // methods to split based on InstructionFlag and then rank each list
                DisplayRankedListOfTrades(service);
            }
        }
 public void Cleanup()
 {
     tradeRepo.Dispose();
     helper = null;
 }