Init() public method

public Init ( ) : void
return void
 public void Can_detect_changes_to_file()
 {
     var file = Path.Combine(".", "testfile1.xml");
     if (File.Exists(file)) { File.Delete(file); }
     File.WriteAllText(file, _buffer);
     var files = new List<LogEntry>();
     using (var watcher = new Watcher(new FileWithPosition(file))
     {
         logentry = l => { files.Add(l); }
     })
     {
         watcher.Init();
         Assert.That(files.Count, Is.EqualTo(1));
         File.AppendAllText(file, _buffer);
         Thread.Sleep(100/*750*3*/);
         Assert.That(files.Count, Is.EqualTo(2));
     }
 }
        public void Can_handle_rolling_log()
        {
            var file = Path.Combine(".", "testfile2.xml");
            if (File.Exists(file)) { File.Delete(file); }
            File.WriteAllText(file, _buffer);
            var outofbounds = 0;
            var files = new List<LogEntry>();
            using (var watcher = new Watcher(new FileWithPosition(file))
            {
                logentry = l => { files.Add(l); },
                outOfBounds = () => { outofbounds++; }
            })
            {
                watcher.Init();

                File.WriteAllText(file, "");
                Thread.Sleep(100/*750*3*/);
                Assert.That(outofbounds, Is.EqualTo(1));
            }
        }