Ejemplo n.º 1
0
        public static Mock <IDbCommand> CreateIDbCommand(this MockRepository factory)
        {
            var command = factory.Create <IDbCommand>();

            command.SetupAllProperties();
            command.Setup(c => c.CreateParameter()).Returns(() => factory.CreateIDbDataParameter().Object);
            command.Setup(c => c.Parameters).Returns(factory.CreateIDataParameterCollection().Object);

            return(command);
        }