public TestCommandBatchPreparer( ModificationCommandBatchFactory modificationCommandBatchFactory, ParameterNameGeneratorFactory parameterNameGeneratorFactory, ModificationCommandComparer modificationCommandComparer) : base(modificationCommandBatchFactory, parameterNameGeneratorFactory, modificationCommandComparer) { }
public TestCommandBatchPreparer( ModificationCommandBatchFactory modificationCommandBatchFactory, ParameterNameGeneratorFactory parameterNameGeneratorFactory, ModificationCommandComparer modificationCommandComparer, IBoxedValueReaderSource boxedValueReaderSource) : base(modificationCommandBatchFactory, parameterNameGeneratorFactory, modificationCommandComparer, boxedValueReaderSource) { }
private static CommandBatchPreparer CreateCommandBatchPreparer(ModificationCommandBatchFactory modificationCommandBatchFactory = null) { modificationCommandBatchFactory = modificationCommandBatchFactory ?? new TestModificationCommandBatchFactory(new Mock <SqlGenerator>().Object); return(new TestCommandBatchPreparer(modificationCommandBatchFactory, new ParameterNameGeneratorFactory(), new ModificationCommandComparer())); }
private static CommandBatchPreparer CreateCommandBatchPreparer(ModificationCommandBatchFactory modificationCommandBatchFactory = null) { modificationCommandBatchFactory = modificationCommandBatchFactory ?? new ModificationCommandBatchFactory(new Mock <SqlGenerator>().Object); return(new CommandBatchPreparer(modificationCommandBatchFactory, new ParameterNameGeneratorFactory(), new BidirectionalAdjacencyListGraphFactory(), new ModificationCommandComparer())); }
private static CommandBatchPreparer CreateCommandBatchPreparer(ModificationCommandBatchFactory modificationCommandBatchFactory = null) { return(new CommandBatchPreparer( modificationCommandBatchFactory ?? new ModificationCommandBatchFactory(new Mock <SqlGenerator> { CallBase = true }.Object, new Mock <DbContextConfiguration>().Object), new ParameterNameGeneratorFactory(), new BidirectionalAdjacencyListGraphFactory(), new ModificationCommandComparer())); }
public void AddCommand_delegates() { var sqlGenerator = new Mock <SqlGenerator>().Object; var factory = new ModificationCommandBatchFactory(sqlGenerator); var modificationCommandBatchMock = new Mock <ModificationCommandBatch>(); var mockModificationCommand = new Mock <ModificationCommand>().Object; factory.AddCommand(modificationCommandBatchMock.Object, mockModificationCommand); modificationCommandBatchMock.Verify(mcb => mcb.AddCommand(mockModificationCommand)); }
public void Create_returns_new_instances() { var factory = new ModificationCommandBatchFactory( new Mock <SqlGenerator>().Object); var firstBatch = factory.Create(); var secondBatch = factory.Create(); Assert.NotNull(firstBatch); Assert.NotNull(secondBatch); Assert.NotSame(firstBatch, secondBatch); }