Esempio n. 1
0
        /// <summary>
        /// Creates a new connection to the target database, allowing a test to communicate with other databases.  The returned <see cref="ITestRunner"/> must be disposed, so it is recommended to wrap it in a using statement
        /// </summary>
        /// <param name="connectionString">The connection string of the database to connect to</param>
        /// <returns>Returns the <see cref="ITestRunner"/> for the new database</returns>
        protected async Task <ITestRunner> NewConnectionByConnectionStringAsync(string connectionString)
        {
            if (string.IsNullOrWhiteSpace(connectionString))
            {
                throw new ArgumentNullException(nameof(connectionString));
            }

            ITestRunner testRunner = TestRunnerFactory.BuildTestRunner(connectionString);
            await testRunner.InitialiseAsync(TestFramework);

            return(testRunner);
        }