Exemple #1
0
        public override void SetUp()
        {
            base.SetUp();

            Assert.IsFalse(File.Exists(Filename));
            _checkpoint = new FileMultiCheckpoint(Filename, 3);
        }
 public void the_checkpoint_loads_without_errors_if_stored_data_count_is_less_than_best_count()
 {
     using (var checkpoint = new FileMultiCheckpoint(Filename, 10))
     {
         long check;
         Assert.IsTrue(checkpoint.TryGetMinMax(out check));
         Assert.AreEqual(1000, check);
     }
 }
 public void the_checkpoint_loads_and_processed_all_stored_data_even_if_best_count_is_smaller_now()
 {
     using (var checkpoint = new FileMultiCheckpoint(Filename, 2))
     {
         long check;
         Assert.IsTrue(checkpoint.TryGetMinMax(out check));
         Assert.AreEqual(2000, check);
     }
 }
 public void the_checkpoint_contains_all_previously_stored_data()
 {
     using (var checkpoint = new FileMultiCheckpoint(Filename, 3))
     {
         long check;
         Assert.IsTrue(checkpoint.TryGetMinMax(out check));
         Assert.AreEqual(1000, check);
     }
 }
        public override void SetUp()
        {
            base.SetUp();

            var checkpoint = new FileMultiCheckpoint(Filename, 3);

            checkpoint.Update(EndPoint1, 1000);
            checkpoint.Update(EndPoint2, 2000);
            checkpoint.Update(EndPoint3, 3000);
            checkpoint.Flush();
            checkpoint.Dispose();
        }