示例#1
0
        /// <summary>
        /// Starts a new Postgres instance with each call
        /// </summary>
        /// <param name="options">Runner options</param>
        /// <remarks>Should be used for integration tests</remarks>
        public static PostgresRunner Start(PostgresRunnerOptions options = null)
        {
            PostgresRunner pgRunner = null;

            try
            {
                pgRunner = new PostgresRunner(options).Run();

                return(pgRunner);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                pgRunner?.Dispose(true);
                throw;
            }
        }
示例#2
0
 private PostgresRunner(PostgresRunnerOptions options) => _options = options ?? new PostgresRunnerOptions();