Package org.fcrepo.client.utility.validate.process

Examples of org.fcrepo.client.utility.validate.process.ValidatorProcessParameters


    private static final String PIDFILE_PATH = "/my/file/path";

    @Test
    public void simpleTermsSuccess() throws MalformedURLException {
        ValidatorProcessParameters parms =
                createParms(PARAMETER_USERNAME,
                            "username",
                            PARAMETER_PASSWORD,
                            "password",
                            PARAMETER_SERVER_URL,
                            "http://some.url/",
                            PARAMETER_TERMS,
                            "terms");
        assertEquals("username", "username", parms.getServiceInfo()
                .getUsername());
        assertEquals("password", "password", parms.getServiceInfo()
                .getPassword());
        assertEquals("serverurl", new URL("http://some.url/"), parms
                .getServiceInfo().getBaseUrl());
        assertEquals("iteratorType", IteratorType.FS_QUERY, parms
                .getIteratorType());
        FieldSearchQuery fsq = parms.getQuery();
        assertEquals("queryType", FieldSearchQuery.TERMS_TYPE, fsq.getType());
        assertEquals("terms", "terms", fsq.getTerms());
    }
View Full Code Here


    }

    @Test
    public void simpleQuerySuccess() throws QueryParseException,
            MalformedURLException {
        ValidatorProcessParameters parms =
                createParms(PARAMETER_USERNAME,
                            "username",
                            PARAMETER_PASSWORD,
                            "password",
                            PARAMETER_SERVER_URL,
                            "http://some.url/",
                            PARAMETER_QUERY,
                            "pid=fred");
        assertEquals("username", "username", parms.getServiceInfo()
                .getUsername());
        assertEquals("password", "password", parms.getServiceInfo()
                .getPassword());
        assertEquals("serverurl", new URL("http://some.url/"), parms
                .getServiceInfo().getBaseUrl());
        assertEquals("iteratorType", IteratorType.FS_QUERY, parms
                .getIteratorType());
        FieldSearchQuery fsq = parms.getQuery();
        assertEquals("queryType", FieldSearchQuery.CONDITIONS_TYPE, fsq
                .getType());
        assertEquals("conditions", Condition.getConditions("pid=fred"), fsq
                .getConditions());
    }
View Full Code Here

        try {
            dummyFile =
                    File.createTempFile("TestValidatorProcessParameter",
                                        "dummyFile");
            dummyFile.deleteOnExit();
            ValidatorProcessParameters parms =
                    createParms(PARAMETER_USERNAME,
                                "username",
                                PARAMETER_PASSWORD,
                                "password",
                                PARAMETER_SERVER_URL,
                                "http://some.url/",
                                PARAMETER_PIDFILE,
                                dummyFile.getPath());
            assertEquals("username", "username", parms.getServiceInfo()
                    .getUsername());
            assertEquals("password", "password", parms.getServiceInfo()
                    .getPassword());
            assertEquals("serverurl", new URL("http://some.url/"), parms
                    .getServiceInfo().getBaseUrl());
            assertEquals("iteratorType", IteratorType.PIDFILE, parms
                    .getIteratorType());
            File pidfile = parms.getPidfile();
            assertEquals("pidfile", dummyFile, pidfile);
        } finally {
            if (dummyFile != null || dummyFile.exists()) {
                dummyFile.delete();
            }
View Full Code Here

                    PARAMETER_PIDFILE,
                    "/bogus/pidfile/path");
    }

    private ValidatorProcessParameters createParms(String... args) {
        return new ValidatorProcessParameters(args);
    }
View Full Code Here

TOP

Related Classes of org.fcrepo.client.utility.validate.process.ValidatorProcessParameters

Copyright © 2018 www.massapicom. 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.