Examples of FileExists


Examples of org.mule.tck.probe.file.FileExists

    public static void assertFileExists(File pluginsDir, String filePath)
    {
        Prober prober = new PollingProber(5000, 100);
        File marker = new File(pluginsDir, filePath);
        prober.check(new FileExists(marker));
    }
View Full Code Here

Examples of org.mule.tck.probe.file.FileExists

        FileUtils.stringToFile(basepath + "/in/foo.txt", text);

        File file = FileUtils.newFile(basepath, "out/foo.txt.processed");

        PollingProber pollingProber = new PollingProber(5000, 10);
        pollingProber.check(new FileExists(file));

        String result = FileUtils.readFileToString(file, "UTF8");
        assertEquals(text, result);
    }
View Full Code Here

Examples of org.mule.tck.probe.file.FileExists

    private File createTestFile(String folder) throws IOException
    {
        File testFolder = new File(folder);
        testFolder.mkdirs();
        prober.check(new FileExists(testFolder));

        File target = File.createTempFile("mule-file-test-", ".txt", testFolder);
        target.deleteOnExit();
        prober.check(new FileExists(target));
        return target;
    }
View Full Code Here

Examples of org.mule.tck.probe.file.FileExists

        // Exception strategy should be stopped after processing the file
        final FlowConstruct fileFlow = muleContext.getRegistry().lookupFlowConstruct("fileTest");
        prober.check(new FlowStopped(fileFlow));

        // Checks that the source file was not deleted after the exception processing
        prober.check(new FileExists(target));
    }
View Full Code Here

Examples of org.mule.tck.probe.file.FileExists

    private void assetArtifactFolderIsMaintained(String artifactName, File artifactDir)
    {
        Prober prober = new PollingProber(DEPLOYMENT_TIMEOUT, 100);
        File appFolder = new File(artifactDir, artifactName);
        prober.check(new FileExists(appFolder));
    }
View Full Code Here

Examples of org.mule.tck.probe.file.FileExists

    private File createTestFile(String folder) throws IOException
    {
        File testFolder = new File(folder);
        testFolder.mkdirs();
        prober.check(new FileExists(testFolder));

        File target = File.createTempFile("mule-file-test-", ".txt", testFolder);
        target.deleteOnExit();
        FileUtils.writeStringToFile(target, "TEST");
        prober.check(new FileExists(target));

        return target;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.