Package uk.gov.nationalarchives.droid.profile

Examples of uk.gov.nationalarchives.droid.profile.ProfileManager


    /**
     * Starts a profile.
     */
    public void start() {
        ProfileManager profileManager = droidMainUi.getProfileManager();
        DefaultMutableTreeNode rootNode = (DefaultMutableTreeNode) treeModel.getRoot();
        inMemoryNodes.put(-1L, rootNode);

        job = new DroidJob();
        job.setProfileManager(profileManager);
View Full Code Here


    /**
     * Stops a profile.
     */
    public void stop() {
        ProfileManager profileManager = droidMainUi.getProfileManager();
        profileManager.stop(getProfile().getUuid());
        job.cancel(true);
    }
View Full Code Here

    @Test
    public void testMovingThrottleSliderUpdatesThrottle() throws Exception {
       
        final DroidUIContext context = mock(DroidUIContext.class);
        final ProfileManager profileManager = mock(ProfileManager.class);
        final DroidMainFrame mainFrame = mock(DroidMainFrame.class);
        final ProfileInstance profile = mock(ProfileInstance.class);
       
        final String profileId = "abcd";
        when(profile.getUuid()).thenReturn(profileId);
View Full Code Here

    public void testMovingThrottleSliderUpdatesLabel() throws Exception {
       
        final String profileId = "abcd";
       
        final DroidUIContext context = mock(DroidUIContext.class);
        ProfileManager profileManager = mock(ProfileManager.class);
        final DroidMainFrame mainFrame = mock(DroidMainFrame.class);
        final ProfileInstance profile = mock(ProfileInstance.class);
       
        when(profile.getUuid()).thenReturn(profileId);
       
View Full Code Here

    @Test
    @Ignore
    public void testInit() {

        ProfileManager profileManager = mock(ProfileManager.class);
        DroidUIContext context = mock(DroidUIContext.class);
        JTabbedPane tabbedPane = mock(JTabbedPane.class);
        ProfileForm profileForm = mock(ProfileForm.class);

        JProgressBar progressBar = new JProgressBar();
View Full Code Here

    public void testExportThreeProfiles() throws Exception {
       
        final String destination = File.createTempFile("droid", "exportCommandTest").getAbsolutePath();
       
        ExportManager exportManager = mock(ExportManager.class);
        ProfileManager profileManager = mock(ProfileManager.class);
       
        ProfileInstance profile1 = mock(ProfileInstance.class);
        when(profile1.getUuid()).thenReturn("profile1");
       
        ProfileInstance profile2 = mock(ProfileInstance.class);
        when(profile2.getUuid()).thenReturn("profile2");

        ProfileInstance profile3 = mock(ProfileInstance.class);
        when(profile3.getUuid()).thenReturn("profile3");

        when(profileManager.open(eq(new File("foo1")), any(ProgressObserver.class))).thenReturn(profile1);
        when(profileManager.open(eq(new File("foo2")), any(ProgressObserver.class))).thenReturn(profile2);
        when(profileManager.open(eq(new File("foo3")), any(ProgressObserver.class))).thenReturn(profile3);
       
        Future future = mock(Future.class);
        when(exportManager.exportProfiles(any(List.class), eq(destination), (Filter) isNull(), eq(ExportOptions.ONE_ROW_PER_FORMAT), eq("UTF-8"))).thenReturn(future);
       
        ExportCommand command = new ExportCommand();
View Full Code Here

    @Test
    public void testExportProfileWithNarrowFilter() throws Exception {
       
        ExportManager exportManager = mock(ExportManager.class);
        ProfileManager profileManager = mock(ProfileManager.class);
       
        ProfileInstance profile1 = mock(ProfileInstance.class);
        when(profile1.getUuid()).thenReturn("profile1");
       
        when(profileManager.open(eq(new File("foo1")), any(ProgressObserver.class))).thenReturn(profile1);
       
        Future future = mock(Future.class);
        when(exportManager.exportProfiles(any(List.class), eq("destination"), any(Filter.class), eq(ExportOptions.ONE_ROW_PER_FORMAT), any(String.class))).thenReturn(future);
       
        ExportCommand command = new ExportCommand();
View Full Code Here

TOP

Related Classes of uk.gov.nationalarchives.droid.profile.ProfileManager

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.