public void Initialize()
        {
            commandMock     = new Mock <IDbCommand>();
            connectionMock  = new Mock <IDbConnection>();
            transactionMock = new Mock <IDbTransaction>();
            connectionMock.Setup(c => c.CreateCommand()).Returns(commandMock.Object);
            connectionMock.Setup(c => c.BeginTransaction()).Returns(transactionMock.Object);
            ProviderFactory.ConnectionFactory = (provider) => connectionMock.Object;
            ProviderFactory.CustomProvider    = (provider) => new SqlProvider();

            parameterMock           = new Mock <IDbDataParameter>();
            parameterCollectionMock = new Mock <IDataParameterCollection>();
            commandMock.Setup(c => c.CreateParameter()).Returns(parameterMock.Object);
            commandMock.Setup(c => c.Parameters).Returns(parameterCollectionMock.Object);
            commandMock.Setup(c => c.CommandText).Returns(String.Empty);

            target = new Airplane {
                Name = "Fokker Dr.I", FirstFlight = 1917
            };
            anotherTarget = new AnotherAirplaneClass {
                Name = "Fokker Dr.I", FirstFlight = 1917
            };
            command        = new DataObjectCommand <Airplane>();
            anotherCommand = new DataObjectCommand <AnotherAirplaneClass>(table: "AirplanesTable", primaryKey: "AirplaneCode");
        }
        public void Initialize()
        {
            commandMock = new Mock<IDbCommand>();
            connectionMock = new Mock<IDbConnection>();
            transactionMock = new Mock<IDbTransaction>();
            connectionMock.Setup(c => c.CreateCommand()).Returns(commandMock.Object);
            connectionMock.Setup(c => c.BeginTransaction()).Returns(transactionMock.Object);
            ProviderFactory.ConnectionFactory = (provider) => connectionMock.Object;
            ProviderFactory.CustomProvider = (provider) => new SqlProvider();

            parameterMock = new Mock<IDbDataParameter>();
            parameterCollectionMock = new Mock<IDataParameterCollection>();
            commandMock.Setup(c => c.CreateParameter()).Returns(parameterMock.Object);
            commandMock.Setup(c => c.Parameters).Returns(parameterCollectionMock.Object);
            commandMock.Setup(c => c.CommandText).Returns(String.Empty);

            target = new Airplane { Name = "Fokker Dr.I", FirstFlight = 1917 };
            anotherTarget = new AnotherAirplaneClass { Name = "Fokker Dr.I", FirstFlight = 1917 };
            command = new DataObjectCommand<Airplane>();
            anotherCommand = new DataObjectCommand<AnotherAirplaneClass>(table: "AirplanesTable", primaryKey: "AirplaneCode");
        }