Package org.fcrepo.client.utility.validate

Examples of org.fcrepo.client.utility.validate.ValidationResult


    @Test
    public void gettingFromPidThrowsException() {
        objectSource.throwObjectSourceExceptionOnPid(SAMPLE_PID);

        ValidationResult expected =
                expectedResult(new BasicObjectInfo(SAMPLE_PID),
                               ValidationResultNotation
                                       .objectNotFound(SAMPLE_PID));

        ValidationResult actual = validator.validate(SAMPLE_PID);
        assertEquals("result", expected, actual);
    }
View Full Code Here


        assertEquals("result", expected, actual);
    }

    @Test
    public void pidReturnsNullObject() {
        ValidationResult expected =
                expectedResult(new BasicObjectInfo(SAMPLE_PID),
                               ValidationResultNotation
                                       .objectNotFound(SAMPLE_PID));

        ValidationResult actual = validator.validate(SAMPLE_PID);
        assertEquals("result", expected, actual);
    }
View Full Code Here

        assertEquals("result", expected, actual);
    }

    @Test
    public void simpleSuccessFromPid() {
        ValidationResult expected = expectedResult(OBJECT_SIMPLE_SAMPLE);
        ValidationResult actual =
                validator.validate(OBJECT_SIMPLE_SAMPLE.getPid());
        assertEquals("result", expected, actual);
    }
View Full Code Here

    /**
     * If I validate this object, I should get these notes.
     */
    private void validateObject(BasicObjectInfo object,
                                ValidationResultNotation... expectedNotes) {
        ValidationResult expected = expectedResult(object, expectedNotes);
        ValidationResult actual = validator.validate(object);
        assertEquals("result", expected, actual);
    }
View Full Code Here

    /**
     * Assemble the expected {@link ValidationResult}.
     */
    private ValidationResult expectedResult(BasicObjectInfo object,
                                            ValidationResultNotation... notes) {
        ValidationResult result = new ValidationResult(object);
        for (ValidationResultNotation note : notes) {
            result.addNote(note);
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of org.fcrepo.client.utility.validate.ValidationResult

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.