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); }
public void testHideShowZeros() { O.freezeNow("07/01/2009"); MarketTickersTable.TICKERS.C_BLOOMBERG.updateOne(MarketTickersTable.TICKERS.C_MARKET.@is("FV.1C"), "anything"); MarketTickersTable.TICKERS.C_BLOOMBERG.updateOne(MarketTickersTable.TICKERS.C_MARKET.@is("TU.1C"), "TOE"); var nday20 = new Topic("TOMAHAWK.NDayBreak.1.0.daily.BFBD20.FV.1C.optimalPosition"); 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(1, watcher.visible); publishTomahawk(nday20, 11, "2009/07/01 14:00:04"); fakeGui.waitMatches(2, watcher.visible); watcher.setFilterZeroes(false); fakeGui.wait(() => watcher.visible() > 10); }