Esempio n. 1
0
        public void testShowHidden()
        {
            O.freezeNow("07/01/2009");
            WatcherExclusionsTable.EXCLUSIONS.insert("QF.NDayBreak");
            MarketTickersTable.TICKERS.C_BLOOMBERG.updateOne(MarketTickersTable.TICKERS.C_MARKET.@is("TU.1C"), "TOE");
            var tuTopic = LiveWatcher.tickerTopic("QF.NDayBreak", "TOE", "Comdty");
            var fakeGui = new FakeWatcherGui();
            var watcher = new LiveWatcher(fakeGui);

            watcher.initialize();
            watcher.requireVisible(0);
            publishAim(tuTopic, "QF.NDayBreak", "TOE", "COMDTY", 5, "2009/07/01 14:00:03");
            fakeGui.waitMatches(0, watcher.visible);
            watcher.setShowHidden(true);
            fakeGui.waitMatches(1, watcher.visible);
            var visible = O.first(watcher.visibleRows());

            watcher.setShowHidden(false);
            fakeGui.waitMatches(0, watcher.visible);

            watcher.removeExclusion(visible);
            fakeGui.waitMatches(1, watcher.visible);

            watcher.addExclusion(visible);
            fakeGui.waitMatches(0, watcher.visible);
        }