예제 #1
0
        public void ReportConnectionTest()
        {
            s_utilities.Init(TWSUtilities.REPORT_READER);
            bool expected = true;
            bool actual   = s_utilities.Connect();

            Assert.AreEqual(expected, actual, "Report connection test failed");
        }
        private bool Connect()
        {
            if (!m_bConnected)
            {
                if (m_twsUtilities.Init(TWSUtilities.HISTORICAL_READER, m_ipAddress, m_port))
                {
                    m_bConnected = m_twsUtilities.Connect();
                }

                if (m_bConnected)
                {
                    m_bConnected = m_twsUtilities.StartHistoricalReader();
                }
            }
            return(m_bConnected);
        }