public static Mock <IDbConnection> CreateIDbConnection(this MockRepository repository)
        {
            var connection = repository.Create <IDbConnection>();

            connection.SetupAllProperties();
            connection.Setup(c => c.CreateCommand()).Returns(() => repository.CreateIDbCommand().Object);

            return(connection);
        }
        public DbCommandBuilderTests()
        {
            var repository = new MockRepository(MockBehavior.Strict)
            {
                DefaultValue = DefaultValue.Mock
            };

            _connection = repository.Create <IDbConnectionWrapper>()
                          .SetupAllProperties();
            _connection.Setup(c => c.CreateCommand())
            .Returns(() => repository.CreateIDbCommand().Object);
        }