public void GetFileNameUsingPatternTests_WhenSearchingForASingleFileAndMultiplesResultShouldThrowException() { var getFileNameUsingPattern = new GetFileNameUsingPattern(); File.Copy("TestLib.nuspec", "FileSearch1.test.nuspec"); File.Copy("TestLib.nuspec", "FileSearch1.nuspec"); getFileNameUsingPattern.FindFile("FileSearch1*.nuspec", TestContext.DeploymentDirectory); }
public void GetFileNameUsingPatternTests_WhenSearchingForASingleFileShouldReturnFilePath() { var getFileNameUsingPattern = new GetFileNameUsingPattern(); File.Copy("TestLib.nuspec", "FileSearch0.nuspec"); var filePath = getFileNameUsingPattern.FindFile("FileSearch0*.nuspec", TestContext.DeploymentDirectory); Assert.AreEqual(Path.Combine(TestContext.DeploymentDirectory, "FileSearch0.nuspec"), filePath); }
public void GetFileNameUsingPatternTests_WhenSearchingForASingleFileAndNoneResultShouldThrowException() { var getFileNameUsingPattern = new GetFileNameUsingPattern(); getFileNameUsingPattern.FindFile("NoWayThisWillResult.InASuccess", TestContext.DeploymentDirectory); }
public void GetFileNameUsingPatternTests_WhenPassingInEmptyValueForSearchPatternShouldThrowException() { var getFileNameUsingPattern = new GetFileNameUsingPattern(); getFileNameUsingPattern.FindFile(string.Empty, TestContext.DeploymentDirectory); }
public void GetFileNameUsingPatternTests_WhenPassingInEmptyValueForSearchFolderShouldThrowException() { var getFileNameUsingPattern = new GetFileNameUsingPattern(); getFileNameUsingPattern.FindFile("file*.pattern", string.Empty); }