Examples of TestAssertion


Examples of com.eviware.soapui.model.testsuite.TestAssertion

                    assertionListPopup.add(new ShowOnlineHelpAction(getHelpUrl()));
                    return;
                }
                int[] indices = assertionList.getSelectedIndices();
                if (indices.length == 1) {
                    TestAssertion assertion = assertionListModel.getAssertionAt(ix);
                    ActionSupport.addActions(ActionListBuilder.buildActions(assertion), assertionListPopup);

                } else {
                    TestAssertion[] testAssertion = new TestAssertion[indices.length];
                    for (int c = 0; c < indices.length; c++) {
                        testAssertion[c] = assertionListModel.getAssertionAt(indices[c]);
                    }

                    ActionSupport.addActions(ActionListBuilder.buildMultiActions(testAssertion), assertionListPopup);
                }
            }

            public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
            }

            public void popupMenuCanceled(PopupMenuEvent e) {
            }
        });

        assertionList.setComponentPopupMenu(assertionListPopup);

        assertionList.addMouseListener(new MouseAdapter() {

            public void mouseClicked(MouseEvent e) {
                if (e.getClickCount() < 2) {
                    return;
                }

                int ix = assertionList.getSelectedIndex();
                if (ix == -1) {
                    return;
                }

                Object obj = assertionList.getModel().getElementAt(ix);
                if (obj instanceof TestAssertion) {
                    TestAssertion assertion = (TestAssertion) obj;
                    if (assertion.isConfigurable()) {
                        assertion.configure();
                    }

                    return;
                }

                if (obj instanceof AssertionError) {
                    AssertionError error = (AssertionError) obj;
                    if (error.getLineNumber() >= 0) {
                        selectError(error);
                    } else {
                        Toolkit.getDefaultToolkit().beep();
                    }
                } else {
                    Toolkit.getDefaultToolkit().beep();
                }
            }
        });

        assertionList.addKeyListener(new KeyAdapter() {
            public void keyPressed(KeyEvent e) {
                int ix = assertionList.getSelectedIndex();
                if (ix == -1) {
                    return;
                }

                int[] indices = assertionList.getSelectedIndices();
                if (indices.length == 1) {
                    TestAssertion assertion = assertionListModel.getAssertionAt(ix);
                    if (e.getKeyChar() == KeyEvent.VK_ENTER) {
                        if (assertion.isConfigurable()) {
                            assertion.configure();
                        }
                    } else {
                        ActionList actions = ActionListBuilder.buildActions(assertion);
                        if (actions != null) {
                            actions.dispatchKeyEvent(e);
View Full Code Here

Examples of com.eviware.soapui.model.testsuite.TestAssertion

                moveAssertionDownAction.setEnabled(ix >= 0);

                if (ix == -1) {
                    return;
                }
                TestAssertion assertion = assertionListModel.getAssertionAt(ix);
                configureAssertionAction.setEnabled(assertion != null && assertion.isConfigurable());
            }
        });

        return toolbar;
    }
View Full Code Here

Examples of com.eviware.soapui.model.testsuite.TestAssertion

        public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
                                                      boolean cellHasFocus) {
            setEnabled(list.isEnabled());

            if (value instanceof TestAssertion) {
                TestAssertion assertion = (TestAssertion) value;
                setText(assertion.getLabel() + " - " + assertion.getStatus().toString());
                setIcon(assertion.getIcon());

                if (assertion.isDisabled() && isEnabled()) {
                    setEnabled(false);
                }
            } else if (value instanceof AssertionError) {
                AssertionError assertion = (AssertionError) value;
                setText(" -> " + assertion.toString());
                setIcon(null);
            } else if (value instanceof String) {
                setText(value.toString());
            }
View Full Code Here

Examples of com.eviware.soapui.model.testsuite.TestAssertion

        private void init() {
            assertable.addAssertionsListener(this);

            for (int c = 0; c < assertable.getAssertionCount(); c++) {
                TestAssertion assertion = assertable.getAssertionAt(c);
                addAssertion(assertion);
            }
        }
View Full Code Here

Examples of org.apache.cxf.ws.policy.TestAssertion

        Assertor assertor = control.createMock(Assertor.class);
              
        Policy policy = new Policy();
        ExactlyOne ea = new ExactlyOne();
        All all = new All();
        PolicyAssertion a1 = new TestAssertion();
        all.addAssertion(a1);
        ea.addPolicyComponent(all);
        Collection<PolicyAssertion> maxAlternative =
            CastUtils.cast(all.getPolicyComponents(), PolicyAssertion.class);
        all = new All();
View Full Code Here

Examples of org.apache.cxf.ws.policy.TestAssertion

        Assertor assertor = control.createMock(Assertor.class);
              
        Policy policy = new Policy();
        ExactlyOne ea = new ExactlyOne();
        All all = new All();
        PolicyAssertion a1 = new TestAssertion();
        all.addAssertion(a1);
        ea.addPolicyComponent(all);
        Collection<PolicyAssertion> maxAlternative =
            CastUtils.cast(all.getPolicyComponents(), PolicyAssertion.class);
        all = new All();
View Full Code Here

Examples of org.apache.cxf.ws.policy.TestAssertion

        Assertor assertor = control.createMock(Assertor.class);
              
        Policy policy = new Policy();
        ExactlyOne ea = new ExactlyOne();
        All all = new All();
        PolicyAssertion a1 = new TestAssertion();
        all.addAssertion(a1);
        ea.addPolicyComponent(all);
        Collection<PolicyAssertion> firstAlternative =
            CastUtils.cast(all.getPolicyComponents(), PolicyAssertion.class);
        policy.addPolicyComponent(ea);
View Full Code Here

Examples of org.apache.cxf.ws.policy.TestAssertion

        Assertor assertor = control.createMock(Assertor.class);
              
        Policy policy = new Policy();
        ExactlyOne ea = new ExactlyOne();
        All all = new All();
        PolicyAssertion a1 = new TestAssertion();
        all.addAssertion(a1);
        ea.addPolicyComponent(all);
        Collection<PolicyAssertion> maxAlternative =
            CastUtils.cast(all.getPolicyComponents(), PolicyAssertion.class);
        all = new All();
View Full Code Here

Examples of org.apache.cxf.ws.policy.TestAssertion

        Assertor assertor = control.createMock(Assertor.class);
              
        Policy policy = new Policy();
        ExactlyOne ea = new ExactlyOne();
        All all = new All();
        PolicyAssertion a1 = new TestAssertion();
        all.addAssertion(a1);
        ea.addPolicyComponent(all);
        Collection<PolicyAssertion> maxAlternative =
            CastUtils.cast(all.getPolicyComponents(), PolicyAssertion.class);
        all = new All();
View Full Code Here

Examples of org.apache.cxf.ws.policy.TestAssertion

        Assertor assertor = control.createMock(Assertor.class);
              
        Policy policy = new Policy();
        ExactlyOne ea = new ExactlyOne();
        All all = new All();
        PolicyAssertion a1 = new TestAssertion();
        all.addAssertion(a1);
        ea.addPolicyComponent(all);
        Collection<PolicyAssertion> firstAlternative =
            CastUtils.cast(all.getPolicyComponents(), PolicyAssertion.class);
        policy.addPolicyComponent(ea);
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.