public void Should_work_out_correct_number_of_batches() { const int batchBy = 10; const int numberOfItems = 28; const int expectedBatches = numberOfItems / batchBy; const int expectedRemainder = numberOfItems % batchBy; Given_a_solr_resolver_that_returns_a_stubbed_solr_instance(); Given_a_set_of_items_of_length(numberOfItems); var batchedIndexer = new Batcher<TestClass>(batchBy); batchedIndexer.PrepareBatch(_itemsToIndex.Count); Assert.That(batchedIndexer.NumberOfBatches, Is.EqualTo(expectedBatches)); Assert.That(batchedIndexer.Remainder, Is.EqualTo(expectedRemainder)); }