示例#1
0
        public async Task AccountUpdatesController_Should_ReturnInformation()
        {
            // Setup
            TwsObjectFactory   twsObjectFactory = new TwsObjectFactory("localhost", TestConstants.Port, 1);
            ITwsControllerBase twsController    = twsObjectFactory.TwsControllerBase;

            await twsController.EnsureConnectedAsync();

            // Call
            string accountId = "DU1052488";
            ConcurrentDictionary <string, string> accountUpdates = twsController.GetAccountDetailsAsync(accountId).ConfigureAwait(false).GetAwaiter().GetResult();

            // Assert
            accountUpdates.Count.Should().BeGreaterThan(0);

            // Tear down
            await twsController.DisconnectAsync();
        }