public void MaxBatchSize_is_optional()
        {
            var optionsBuilder = new DbContextOptionsBuilder();
            optionsBuilder.UseSqlServer("Database=Crunchie");

            var factory = new SqlServerModificationCommandBatchFactory(
                new RelationalCommandBuilderFactory(new SqlServerTypeMapper()),
                new SqlServerUpdateSqlGenerator(new SqlServerSqlGenerator()),
                new UntypedRelationalValueBufferFactoryFactory(),
                optionsBuilder.Options);

            var batch = factory.Create();

            Assert.True(batch.AddCommand(new ModificationCommand("T1", null, new ParameterNameGenerator(), p => p.SqlServer())));
            Assert.True(batch.AddCommand(new ModificationCommand("T1", null, new ParameterNameGenerator(), p => p.SqlServer())));
        }
        public void Uses_MaxBatchSize_specified_in_SqlServerOptionsExtension()
        {
            var optionsBuilder = new DbContextOptionsBuilder();
            optionsBuilder.UseSqlServer("Database=Crunchie").MaxBatchSize(1);

            var factory = new SqlServerModificationCommandBatchFactory(
                new RelationalCommandBuilderFactory(
                    new FakeSensitiveDataLogger<RelationalCommandBuilderFactory>(),
                    new DiagnosticListener("Fake"),
                    new SqlServerTypeMapper()),
                new SqlServerSqlGenerator(),
                new SqlServerUpdateSqlGenerator(new SqlServerSqlGenerator()),
                new UntypedRelationalValueBufferFactoryFactory(),
                optionsBuilder.Options);

            var batch = factory.Create();

            Assert.True(batch.AddCommand(new ModificationCommand("T1", null, new ParameterNameGenerator(), p => p.SqlServer())));
            Assert.False(batch.AddCommand(new ModificationCommand("T1", null, new ParameterNameGenerator(), p => p.SqlServer())));
        }