Examples of perform()


Examples of mallemuck.model.command.Move.perform()

        data.addItem(Keys.SOURCE_FILES, sources);
        data.addItem(Keys.DEST_DIR, destanation);
        // Create command.
        Move move = new Move();
        try {
            move.perform(data);
        } catch (Exception exception) {
            exception.printStackTrace();
        }
        // Refresh panels.
        CommandData refreshData = new CommandData();
View Full Code Here

Examples of mallemuck.model.command.Refresh.perform()

        // Refresh panels.
        CommandData refreshData = new CommandData();
        refreshData.addItem(Keys.PANELS, panels);
        Refresh refresh = new Refresh();
        try {
            refresh.perform(refreshData);
        } catch (Exception exception) {
            exception.printStackTrace();
        }
    }
View Full Code Here

Examples of mallemuck.model.command.Rename.perform()

                File file = getSelectedFile();
                data.addItem(Keys.FILE, file);
                // Create command.
                Rename rename = new Rename();
                try {
                        rename.perform(data);
                } catch (Exception exception) {
                        exception.printStackTrace();
                }
                // Refresh panels.
                CommandData refreshData = new CommandData();
View Full Code Here

Examples of mallemuck.model.command.SendEmail.perform()

                MessageData messageData = dialog.getMessageData();
                data.addItem(Keys.MESSAGE_DATA, messageData);
                // Create command.
                SendEmail sendEmail = new SendEmail();
                try {
                        sendEmail.perform(data);
                } catch (Exception exception) {
                        exception.printStackTrace();
                        JOptionPane.showMessageDialog(
                                dialog,
                                "Сообщение не было отправлено.",
View Full Code Here

Examples of mallemuck.model.command.View.perform()

                CommandData data = new CommandData();
                data.addItem(Keys.FILE, file);
                // Create command.
                View view = new View();
                try {
                        view.perform(data);
                } catch (Exception exception) {
                        exception.printStackTrace();
                }
        }
        private File getSelectedFile() {
View Full Code Here

Examples of mallemuck.model.command.ZipUnzip.perform()

                dialog.pack();
                dialog.setVisible(true);               
                // Create command.
                ZipUnzip command = new ZipUnzip();
                try {
                        command.perform(data);
                } catch (Exception exception) {
                        exception.printStackTrace();
                }
                // Refresh panels.
                CommandData refreshData = new CommandData();
View Full Code Here

Examples of net.emaze.dysfunctional.dispatching.actions.BinaryAction.perform()

    }

    @Test(expected = ClassCastException.class)
    public void passingWrongTypeForTimeUnitInErasureYieldsException() {
        BinaryAction action = sleeper;
        action.perform(1l, new Object());
    }

    @Test(expected = ClassCastException.class)
    public void passingWrongTypeForDurationInErasureYieldsException() {
        BinaryAction action = sleeper;
View Full Code Here

Examples of net.emaze.dysfunctional.dispatching.delegates.BinaryDelegate.perform()

    @Test(expected = ClassCastException.class)
    public void callingErasureWithWrongTypeYieldsException() {
        Comparator<Integer> comp = new ComparableComparator<Integer>();
        BinaryDelegate d = new MakeOrder<Integer>(comp);
        d.perform(new Object(), new Object());
    }

    @Test
    public void canOrderComparablesWhenLhsIsLesser() {
        Comparator<Integer> comp = new ComparableComparator<Integer>();
View Full Code Here

Examples of net.emaze.dysfunctional.dispatching.delegates.Delegate.perform()

   

    @Test(expected = ClassCastException.class)
    public void passingWrongTypeToErasureYieldsException() {
        Delegate c = new Reductor<Long, Integer>(new Count<Integer>(), 0l);
        c.perform(new Object());
    }   
}
View Full Code Here

Examples of net.emaze.dysfunctional.dispatching.delegates.TernaryDelegate.perform()

    }

    @Test// you probably expect this (expected = ClassCastException.class)
    public void passingWrongTypeToErasureJustForwardsToTheNestedAction() {
        TernaryDelegate d = new TernaryPredicateToTernaryDelegate<O, O, O>(new TernaryAlways<O, O, O>());
        d.perform(new Object(), new Object(), new Object());
    }

    @Test
    public void adapterCorrectlyPassesFirstParamToAdapted() {
        final Box<O> param1 = Box.empty();
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.