public void SetUp() { string tempPath = Path.GetTempPath(); _fileToMonitor1 = Path.Combine(tempPath, "fileToMonitor1"); _fileToMonitor2 = Path.Combine(tempPath, "fileToMonitor2"); _fileStoreMock = new Mock <IFileStore>(); _loggerMock = new Mock <ILogger>(); Dictionary <string, string> filePathsToMonitor = GetFilePathsToMonitor(); _fileBackupProvider = new FileBackupProvider(_fileStoreMock.Object, _loggerMock.Object); _fileBackupProvider.Initialize(filePathsToMonitor); }
public void ExceptionRaisedWhenNullFileListIsProvidedOtherCtr() { var anotherFileBackupProvider = new FileBackupProvider(_fileStoreMock.Object, _loggerMock.Object); Assert.That(() => anotherFileBackupProvider.Initialize((IEnumerable <IConfigItem>)null), Throws.Exception.TypeOf <ArgumentNullException>()); }
public void ExceptionRaisedWhenNullFileListIsProvided() { var anotherFileBackupProvider = new FileBackupProvider(_fileStoreMock.Object, _loggerMock.Object); Assert.That(() => anotherFileBackupProvider.Initialize((Dictionary <string, string>)null), Throws.Exception.TypeOf <ArgumentNullException>()); }