public void CurrentWatchingPath_IsPassedValidPath_DoesNotThrowException(string path) { var fileWatcher = new FileWatcher(); fileWatcher.Invoking(fw => fw.CurrentWatchingPath = path).Should().NotThrow(); fileWatcher.CurrentWatchingPath.Should().NotBeNullOrWhiteSpace(); Directory.Exists(fileWatcher.CurrentWatchingPath).Should().BeTrue(); }
public void CurrentWatchingPath_IsPassedInvalidPath_ThrowsException(string path) { var fileWatcher = new FileWatcher(); fileWatcher.Invoking(fw => fw.CurrentWatchingPath = path).Should().Throw <IOException>(); }