Exemple #1
0
 public void SequenceIsOneWhenNoPreviousFile()
 {
     using (var dir = new TestDirectory())
     {
         var latest = LogFileInfo.GetLatestOrNew(new DateTime(2015, 01, 15), dir.LogDirectory);
         Assert.That(latest.Sequence, Is.EqualTo(1));
     }
 }
Exemple #2
0
            public void SequenceIsEqualToTheHighestFileWritten()
            {
                var date = new DateTime(2015, 01, 15);

                using (var dir = new TestDirectory())
                {
                    dir.CreateLogFile(date, 1);
                    dir.CreateLogFile(date, 2);
                    dir.CreateLogFile(date, 3);
                    var latest = LogFileInfo.GetLatestOrNew(new DateTime(2015, 01, 15), dir.LogDirectory);
                    Assert.That(latest.Sequence, Is.EqualTo(3));
                }
            }