public void Validate_WhenAllGood_ReturnsSuccess() { fileSystemOperationsMock.FileExists("arg1").Returns(true); fileSystemOperationsMock.DirectoryExists("arg2").Returns(true); Assert.That(systemUnderTest.Validate(new[] { "arg1", "arg2" }), Is.EqualTo(Constants.ErrorCodes.Success)); }
private int ValidateOutputDirectoryName(string outputDirectoryName) { if (string.IsNullOrWhiteSpace(outputDirectoryName)) { return(Constants.ErrorCodes.InvalidOutputDirectoryName); } if (!fileSystemOperations.DirectoryExists(outputDirectoryName)) { return(Constants.ErrorCodes.OutputDirectoryDoesNotExist); } return(Constants.ErrorCodes.Success); }