public void testFilenameListWithAppendedIndex() { MultifileOptions options = new MultifileOptions(); options.FormatPattern = "*$J(.)"; options.MaxDayTry = 66; LinkedList<string> files = CreateTestfilesWithoutDate(); string firstFile = files.Last.Value; ILogFileInfo info = new LogFileInfo(new Uri(firstFile)); RolloverFilenameHandler handler = new RolloverFilenameHandler(info, options); LinkedList<string> fileList = handler.GetNameList(); Assert.AreEqual(files, fileList); Cleanup(); }
public ILogFileInfo GetLogfileInfo(string uriString) { Uri uri = new Uri(uriString); if (uri.IsFile) { ILogFileInfo logFileInfo = new LogFileInfo(uri); return logFileInfo; } else { throw new UriFormatException("Uri " + uriString + " is no file Uri"); } }
public ILogFileInfo GetLogfileInfo(string uriString) { Uri uri = new Uri(uriString); if (uri.IsFile) { ILogFileInfo logFileInfo = new LogFileInfo(uri); return(logFileInfo); } else { throw new UriFormatException("Uri " + uriString + " is no file Uri"); } }
public void testFilenameListWithAppendedIndex() { MultifileOptions options = new MultifileOptions(); options.FormatPattern = "*$J(.)"; options.MaxDayTry = 66; LinkedList <string> files = CreateTestfilesWithoutDate(); string firstFile = files.Last.Value; ILogFileInfo info = new LogFileInfo(new Uri(firstFile)); RolloverFilenameHandler handler = new RolloverFilenameHandler(info, options); LinkedList <string> fileList = handler.GetNameList(); Assert.AreEqual(files, fileList); Cleanup(); }