public void ComponentCreateDirectory_Creates_Directory() { string directoryName = "ComponentCreateDirectory_Creates_Directory"; _pathOriginal = Path.Combine(_assemblyFolder, directoryName); FolderLibrary.ComponentCreateDirectory(_pathOriginal); Assert.IsTrue(Directory.Exists(_pathOriginal)); }
public void ComponentCreateDirectory_Events_Log_From_Exception() { // Set up event listener var wasCalled = false; FolderLibrary.Log += (e) => wasCalled = true; // Create directory with an invalid path string directoryName = "ComponentCreateDirectory_Creates_Directory_By_Invalid_Path"; _pathOriginal = Path.Combine(_assemblyFolder, directoryName); FolderLibrary.ComponentCreateDirectory(_pathOriginal + "!?"); Assert.IsTrue(wasCalled); }