public void TestTradingScreen() { var positionManager = new TradingScreenPositionManager { ApiUserId = "malbec2_uat", ApiPassword = "******", ApiSite = "UAT Prod B", ApiPricingServer = "tcp://uatprod.trandingscreen.net:9901", BrokerUrl = "tcp://nyws802:60606", DatabaseConnectionString = FuturesSymbolMappingTest.BuildConnectionString() }; // Fire up the infrastructure positionManager.LoadMapper(); positionManager.StartPublisher(); // Do our tests Assert.IsFalse(positionManager.LoggedIn); Assert.IsTrue(positionManager.LoginToTradingScreen()); Assert.IsTrue(positionManager.LoggedIn); Assert.IsTrue(positionManager.StartProcessingOrders()); Thread.Sleep(10000); Assert.IsTrue(positionManager.LogoffTradingScreen()); Assert.IsFalse(positionManager.LoggedIn); // This may fail as we may not have positions. Should this assume we don't? Assert.IsTrue(positionManager.Positions.Count > 0); }
public void TestMapperReloadScheduled() { var positionManager = new TradingScreenPositionManager(); var loadCount = positionManager.LoadMapper(); Assert.IsTrue(loadCount > 0); var firstDelay = positionManager.ScheduleMapperReload(); Assert.AreNotSame(0, firstDelay); var isSheduled = positionManager.IsMapperReloadScheduled; Assert.IsTrue(isSheduled); }
public void TestMapperReloadScheduled() { var positionManager = new TradingScreenPositionManager { DatabaseConnectionString = FuturesSymbolMappingTest.BuildConnectionString() }; var loadCount = positionManager.LoadMapper(); Assert.IsTrue(loadCount > 0); var firstDelay = positionManager.ScheduleMapperReload(); Assert.AreNotSame(0, firstDelay); var isSheduled = positionManager.IsMapperReloadScheduled; Assert.IsTrue(isSheduled); }