Package org.fcrepo.server.validation

Examples of org.fcrepo.server.validation.RelsValidator.validate()


    public void testValidateValidRelsExt() throws Exception {
        pid = PID.getInstance("demo:888");
        InputStream in = new ByteArrayInputStream(RELS_EXT);
        RelsValidator validator = new RelsValidator();
        validator.validate(pid, "RELS-EXT", in);
    }
    public void testValidateValidRelsInt() throws Exception {
        pid = PID.getInstance("demo:888");
        InputStream in = new ByteArrayInputStream(RELS_INT);
        RelsValidator validator = new RelsValidator();
View Full Code Here


    }
    public void testValidateValidRelsInt() throws Exception {
        pid = PID.getInstance("demo:888");
        InputStream in = new ByteArrayInputStream(RELS_INT);
        RelsValidator validator = new RelsValidator();
        validator.validate(pid, "RELS-INT", in);
    }
    public void testValidateInvalidRelsExt() throws Exception {
        pid = PID.getInstance("demo:888");
        // use RELS-INT sample as a RELS-EXT datastream
        InputStream in = new ByteArrayInputStream(RELS_INT);
View Full Code Here

        pid = PID.getInstance("demo:888");
        // use RELS-INT sample as a RELS-EXT datastream
        InputStream in = new ByteArrayInputStream(RELS_INT);
        RelsValidator validator = new RelsValidator();
        try {
            validator.validate(pid, "RELS-EXT", in);
            fail("Multiple Description elements not allowed for RELS-EXT");
        } catch (ValidationException e) {}
    }

    public void testEmpty() throws Exception {
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.