public PostgresReadModelUnitOfWork(PostgresConfiguration configuration, IPostgresConnectionFactory connectionFactory)
        {
            Connection = connectionFactory.Create(configuration);
            Connection.Open();

            userRepository = new PostgresReadModelUserRepository(Connection);
            transaction    = null;
        }
        public PostgresReadModelUnitOfWorkTests()
        {
            fixture = new Fixture();

            transaction = Substitute.For <IPostgresTransaction>();
            connection  = Substitute.For <IPostgresConnection>();

            connection.BeginTransaction().Returns(transaction);

            connectionFactory = Substitute.For <IPostgresConnectionFactory>();
            connectionFactory.Create(Arg.Any <PostgresConfiguration>()).Returns(connection);
        }