public void StartOrganization() { JPGFileHandler.Naming namingMode = RenameFilesbyDateAndTime ? JPGFileHandler.Naming.EXIFDateTime : JPGFileHandler.Naming.Original; string fullSourceDirectoryPath = Path.GetFullPath(sourceDirectoryPath); string fullDestinationDirectoryPath = Path.GetFullPath(destinationDirectoryPath); ValidateDirectoryPath(fullSourceDirectoryPath, sourceDirectoryValidator, "SourceDirectoryPath"); ValidateDirectoryPath(destinationDirectoryPath, destinationDirectoryValidator, "DestinationDirectoryPath"); if (!HasErrors) { Progress <int> progress = new Progress <int>(); progress.ProgressChanged += HandleProgressChangedEvent; Organizer organizer = new Organizer(fullSourceDirectoryPath, fullDestinationDirectoryPath, progress); JPGFileHandler jpgFileHandler = new JPGFileHandler(organizer, namingMode); UnsupportedFileHandler unsupportedFileHandler = new UnsupportedFileHandler(organizer); Task.Run(() => organizer.Organize()); } }
public void TestInitialize() { organizer = new Organizer(sourceDirectoryPath, destinationDirectoryPath); handler = new UnsupportedFileHandler(organizer); exposedHandler = new PrivateObject(handler); }