Package uk.gov.nationalarchives.droid.profile.throttle

Examples of uk.gov.nationalarchives.droid.profile.throttle.SubmissionThrottle


    }
   
    @Test
    public void testFileEventHandlerSubmitsAJobToDroid() {
       
        SubmissionThrottle throttle = mock(SubmissionThrottle.class);
        fileEventHandler.setSubmissionThrottle(throttle);
       
        File file = new File("test_sig_files/DROID 5  Architecture.doc");
        URI uri = file.toURI();
        AbstractProfileResource resource = mock(AbstractProfileResource.class);
View Full Code Here


    }
   
    @Test
    public void testFileEventHandlerAppliesThrottleAfterSubmittingAFile() throws Exception {
       
        SubmissionThrottle throttle = mock(SubmissionThrottle.class);
        fileEventHandler.setSubmissionThrottle(throttle);
       
        File file = new File("test_sig_files/DROID 5  Architecture.doc");
        fileEventHandler.onEvent(file, new ResourceId(1L, ""), null);
       
View Full Code Here

       
        ResultHandler resultHandler = mock(ResultHandler.class);
       
        fileEventHandler.setResultHandler(resultHandler);
       
        SubmissionThrottle throttle = mock(SubmissionThrottle.class);
        fileEventHandler.setSubmissionThrottle(throttle);

        fileEventHandler.onEvent(file, new ResourceId(1L, ""), null);
       
        ArgumentCaptor<IdentificationException> exCaptor = ArgumentCaptor.forClass(IdentificationException.class);
View Full Code Here

       
        ResultHandler resultHandler = mock(ResultHandler.class);
       
        fileEventHandler.setResultHandler(resultHandler);
       
        SubmissionThrottle throttle = mock(SubmissionThrottle.class);
        fileEventHandler.setSubmissionThrottle(throttle);

        fileEventHandler.onEvent(file, new ResourceId(1L, ""), null);
       
        ArgumentCaptor<IdentificationException> exCaptor = ArgumentCaptor.forClass(IdentificationException.class);
View Full Code Here

    @Test
    public void testSetThrottle() {
       
        final int throttleValue = 1234;
       
        SubmissionThrottle throttle = mock(SubmissionThrottle.class);
        ProfileInstance profile = new ProfileInstance();
       
        FileEventHandler fileEventHandler = mock(FileEventHandler.class);
        when(fileEventHandler.getSubmissionThrottle()).thenReturn(throttle);
        profileInstanceManager.setProfile(profile);
View Full Code Here

    /**
     * {@inheritDoc}
     */
    @Override
    public void setThrottleValue(int throttleValue) {
        final SubmissionThrottle submissionThrottle = specWalker.getFileEventHandler().getSubmissionThrottle();
        submissionThrottle.setWaitMilliseconds(throttleValue);
        profileInstance.setThrottle(throttleValue);
    }
View Full Code Here

TOP

Related Classes of uk.gov.nationalarchives.droid.profile.throttle.SubmissionThrottle

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.