Beispiel #1
0
        public void test_isDataReady_negative2()
        {
            //[Test: non-syn action and data not ready case, synchronizer.getIsDataMerged is false, synchronizer.getNeedMergeFlag is false, Timeseries is null.]
            IAppRTBSynchronizer synchronizer = getAppRTBSynchronizer_for_isDataReady_negative2();
            AppMDManager        appMDManager = new AppMDManager(null);

            appMDManager.injectAppRTBSynchronizer(synchronizer);
            Assert.IsFalse(appMDManager.isDataReady());
        }
Beispiel #2
0
        public void test_isDataReady_positive1()
        {
            //[Test: need syn action and data ready case, synchronizer.getIsDataMerged is true, synchronizer.getNeedMergeFlag is true.]
            IAppRTBSynchronizer synchronizer = getAppRTBSynchronizer_for_isDataReady_positive1();
            AppMDManager        appMDManager = new AppMDManager(null);

            appMDManager.injectAppRTBSynchronizer(synchronizer);
            Assert.IsTrue(appMDManager.isDataReady());
        }
Beispiel #3
0
        public void test_isDataReady_positive2()
        {
            DateTime time1 = new DateTime(2015, 10, 21, 10, 0, 5, DateTimeKind.Local);
            //[Test: non-syn action and data ready case, synchronizer.getIsDataMerged is false, synchronizer.getNeedMergeFlag is false, Timeseries is not null.]
            Series <DateTime, MarketDataElement> TimeSeries = null;

            TimeSeries = addMarketDataElementWithTimeOnlyToSeries(time1, TimeSeries);

            IAppRTBSynchronizer synchronizer = getAppRTBSynchronizer_for_isDataReady_positive2();
            AppMDManager        appMDManager = new AppMDManager(null);

            appMDManager.injectAppRTBSynchronizer(synchronizer);
            appMDManager.setTimeBarSeries(TimeSeries);
            Assert.IsTrue(appMDManager.isDataReady());
        }
Beispiel #4
0
        public void test_checkIsRTBarMergeNeed_negative2()
        {
            //[Test: non-initial and negative case, initFlag is true and isRTBarMergeNeed is false => initFlag is true, getIsRTBarMergeNeed is false]
            IAppRTBSynchronizer synchronizer = getSyn_checkIsRTBarMergeNeed();
            AppMDManager        appMDManager = new AppMDManager(null);

            appMDManager.injectRTBInitFlag(true);
            TickerInfo info = new TickerInfo();

            info.startTime = "false";
            appMDManager.injectAppRTBSynchronizer(synchronizer);
            appMDManager.tickerInfo = info;
            appMDManager.checkIsRTBarMergeNeed();
            Assert.IsTrue(appMDManager.getRTBInitFlag());
            Assert.IsFalse(appMDManager.getIsRTBarMergeNeed());
        }