Package org.jitterbit.integration.data.entity

Examples of org.jitterbit.integration.data.entity.Schedule


    }

    private void replaceSchedule() {
        ScheduleId id = op.getScheduleId();
        if (id != null) {
            Schedule replacement = (Schedule) service.getReplacement(id);
            op.setSchedule(replacement);
        }
    }
View Full Code Here


    }
   
    @Test
    public void ensureSpecialCharactersAreEscaped() {
        Folder f = new Folder("A/B", EntityType.Schedule);
        IntegrationEntity s = new Schedule("A*B+C");
        project.insertEntityUnderRoot(f);
        project.insertEntity(s, f);
        String path = ProjectPath.toPathString(s);
        String expected = "Schedules/A\\/B/A\\*B\\+C";
        assertEquals(expected, path);
View Full Code Here

        assertEquals(expected, completed);
    }
   
    @Test
    public void ensureItemsAreCompleted() {
        project.insertEntityUnderRoot(new Schedule("8 AM"));
        String fragment = "Schedules/8";
        String completed = completer.complete(fragment);
        String expected = "Schedules/8 AM";
        assertEquals(expected, completed);
    }
View Full Code Here

        assertEquals(expected, completed);
    }
   
    @Test
    public void ensurePathToExistingItemIsUntouchedWhenCompleted() {
        project.insertEntityUnderRoot(new Schedule("X"));
        String fragment = "Schedules/X";
        String completed = completer.complete(fragment);
        String expected = fragment;
        assertEquals(expected, completed);
    }
View Full Code Here

   
    @Test
    public void ensureItemAndFolderMatchDoesNotEndWithSeparator() {
        Folder f = new Folder("Production", EntityType.Schedule);
        project.insertEntityUnderRoot(f);
        project.insertEntityUnderRoot(new Schedule("Production"));
        String fragment = "Schedules/P";
        String completed = completer.complete(fragment);
        String expected = "Schedules/Production";
        assertEquals(expected, completed);
    }
View Full Code Here

   
    @Test
    public void ensureComletingFolderPathResultsInChild() {
        Folder f = new Folder("Production", EntityType.Schedule);
        project.insertEntityUnderRoot(f);
        project.insertEntity(new Schedule("Once A Day"), f);
        String fragment = "Schedules/Production/";
        String completed = completer.complete(fragment);
        String expected = "Schedules/Production/Once A Day";
        assertEquals(expected, completed);
    }
View Full Code Here

        assertEquals(expected, completed);
    }
   
    @Test
    public void ensureMultipleMatchResultsInLongestCommonPath() {
        project.insertEntityUnderRoot(new Schedule("Once at noon"));
        project.insertEntityUnderRoot(new Schedule("Once A Day"));
        String fragment = "Schedules/O";
        String completed = completer.complete(fragment);
        String expected = "Schedules/Once a";
        assertEquals(expected.toLowerCase(), completed.toLowerCase());
    }
View Full Code Here

        assertEquals(expected.toLowerCase(), completed.toLowerCase());
    }
   
    @Test
    public void ensureFragmentsWithWildcardsAreNotProcessed() {
        project.insertEntityUnderRoot(new Schedule("Once at noon"));
        project.insertEntityUnderRoot(new Schedule("Once A Day"));
        String fragment = "Schedules/O*";
        String completed = completer.complete(fragment);
        String expected = fragment;
        assertEquals(expected, completed);
    }
View Full Code Here

        assertEquals(expected, completed);
    }
   
    @Test
    public void ensureSpecialCharactersAreEscapedWhenCompleted() {
        Schedule s = new Schedule("A*B+C/D");
        project.insertEntityUnderRoot(s);
        String fragment = "Schedules/A";
        String completed = completer.complete(fragment);
        String expected = ProjectPath.toPathString(s);
        assertEquals(expected, completed);
View Full Code Here

    public void setSchedulesEnabled(Collection<ScheduleId> ids, boolean enabled) {
        // TODO: Change notification
        for (IntegrationProject p : projects.get()) {
            for (ScheduleId id : ids) {
                Schedule s = p.getItemLookup().getEntity(id, Schedule.class);
                if (s != null) {
                    s.setEnabled(enabled);
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.data.entity.Schedule

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.