コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
        public void GetFileNameUsingPatternTests_WhenSearchingForASingleFileAndNoneResultShouldThrowException()
        {
            var getFileNameUsingPattern = new GetFileNameUsingPattern();

            getFileNameUsingPattern.FindFile("NoWayThisWillResult.InASuccess", TestContext.DeploymentDirectory);
        }
コード例 #6
0
        public void GetFileNameUsingPatternTests_WhenPassingInEmptyValueForSearchPatternShouldThrowException()
        {
            var getFileNameUsingPattern = new GetFileNameUsingPattern();

            getFileNameUsingPattern.FindFile(string.Empty, TestContext.DeploymentDirectory);
        }
コード例 #7
0
        public void GetFileNameUsingPatternTests_WhenPassingInEmptyValueForSearchFolderShouldThrowException()
        {
            var getFileNameUsingPattern = new GetFileNameUsingPattern();

            getFileNameUsingPattern.FindFile("file*.pattern", string.Empty);
        }
コード例 #8
0
        public void GetFileNameUsingPatternTests_WhenPassingInEmptyValueForSearchFolderShouldThrowException()
        {
            var getFileNameUsingPattern = new GetFileNameUsingPattern();

            getFileNameUsingPattern.FindFile("file*.pattern", string.Empty);
        }
コード例 #9
0
        public void GetFileNameUsingPatternTests_WhenPassingInEmptyValueForSearchPatternShouldThrowException()
        {
            var getFileNameUsingPattern = new GetFileNameUsingPattern();

            getFileNameUsingPattern.FindFile(string.Empty, TestContext.DeploymentDirectory);
        }
コード例 #10
0
        public void GetFileNameUsingPatternTests_WhenSearchingForASingleFileAndNoneResultShouldThrowException()
        {
            var getFileNameUsingPattern = new GetFileNameUsingPattern();

            getFileNameUsingPattern.FindFile("NoWayThisWillResult.InASuccess", TestContext.DeploymentDirectory);
        }