public void Read_items_persisted_in_single_batch()
 {
     var commands = new GetCommands().Get().ToArray();
     var _persist = new AppendToFile("Proto_CustomerDataTests_2.db".Tap(db => dbs.Add(db)));
     _persist.Batch(commands);
     Assert.That(_persist.ReadAll().Count(), Is.EqualTo(commands.Length));
 }
 public void Read_items_persisted_in_separate_batches()
 {
     var commands = new GetCommands().Get().ToArray();
     var _persist = new AppendToFile("Proto_CustomerDataTests_1.db".Tap(db => dbs.Add(db)));
     var batches = commands.BatchesOf(3).ToArray();
     // in order for the test to be valid
     Assert.That(batches.Length, Is.GreaterThan(2));
     foreach (var batch in batches)
     {
         _persist.Batch(batch);
     }
     Assert.That(_persist.ReadAll().Count(), Is.EqualTo(commands.Length));
 }