Ejemplo n.º 1
0
        public void TestMethod1()
        {
            InvitorFeeMgr ifm = new InvitorFeeMgr();

            ifm.TransferFee();
            Assert.IsNotNull(ifm);
        }
Ejemplo n.º 2
0
        public void bonus_test()
        {
            Match.MatchService ms = new Match.MatchService();
            var t1 = ms.Model.Traders.Where(a => a.Name == "hello56").FirstOrDefault();

            InvitorFeeMgr ifm = new InvitorFeeMgr();
            var           r   = ifm.TransBonus(t1, new System.Collections.Generic.List <string> {
                "hello54", "hello55"
            });

            ms.Flush();

            Assert.AreEqual(r, InvitorFeeService.InvitorBonusInCny * 2);
        }
Ejemplo n.º 3
0
        static MvcApplication()
        {
            try
            {
                Singleton <TextLog> .Instance.Info("开始启动期权交易系统");

                OptionService = new MatchService();
                OptionService.Start();

                Singleton <TextLog> .Instance.Info("开始启动虚拟币交易系统");

                SpotService = new Match.Spot.SpotService(OptionService.Model);



                Com.BitsQuan.Option.Ui.Hubs.TradeHub.Init();
                Com.BitsQuan.Option.Ui.Hubs.SpotHub.Init();
                Com.BitsQuan.Option.Core.BtcPrice.Init();

                if (HasRobot())
                {
                    raiseRobot = new PriceRaiseRobot(-1, OptionService.AddOrder, MatchParams.RaiseMax);
                    OptionService.OnAfterMatch += OnAfterMatch;
                }
                sm = new BlasterSendMsg();
                //保证金报警信息提示
                OptionService.Monitor.dutyBlaster.OnBlasting  += sm.Notify;
                OptionService.Monitor.rightBlaster.OnBlasting += sm.Notify;
                OptionService.Monitor.OnBailWarning           += sm.Warn;
                svcMonitor = new SvcMonitor();
                ifm        = new InvitorFeeMgr();
            }
            catch (Exception ex)
            {
                Singleton <TextLog> .Instance.Error(ex);
            }
        }