Package net.sourceforge.marathon.component

Examples of net.sourceforge.marathon.component.MComponent


        super(componentId, scriptModel, windowMonitor);
        this.content = content;
    }

    public void play(ComponentFinder resolver) {
        MComponent c = resolver.getMComponentById(getComponentId());
        assertTrue("Invoking assertContent on a non-collection component", c instanceof MCollectionComponent);
        MCollectionComponent component = (MCollectionComponent) c;
        assertEquals("Invalid Length", Integer.valueOf(content.length), Integer.valueOf(component.getContent().length));
        String[][] actualData = component.getContent();
        for (int i = 0; i < actualData.length; i++) {
View Full Code Here


    @Test
    public void testAssertingEnabled() {
        JTextField field = new JTextField();
        field.setBackground(Color.red);
        MComponent component = new MComponentMock(field, "foo");
        ComponentFinder resolver = ((MComponentMock) component).getDummyResolver();
        field.setEnabled(true);
        ActionTestCase.assertPasses(
                new AssertAction(new ComponentId("text.name"), AssertAction.ENABLED, ScriptModelServerPart.getModelServerPart(),
                        WindowMonitor.getInstance()), resolver);
View Full Code Here

    @Test
    public void testCheckingColor() {
        JTextField field = new JTextField();
        field.setBackground(Color.red);
        MComponent component = new MComponentMock(field, "foo");
        AssertAction tag = new AssertAction(new ComponentId("foo"), Color.red, ScriptModelServerPart.getModelServerPart(),
                WindowMonitor.getInstance());
        tag.play(((MComponentMock) component).getDummyResolver());
        tag = new AssertAction(new ComponentId("foo"), Color.white, ScriptModelServerPart.getModelServerPart(),
                WindowMonitor.getInstance());
View Full Code Here

    }

    public String[][] getCustomAssertions(Object o) {
        if (!(o instanceof MComponent))
            return new String[0][0];
        MComponent component = (MComponent) o;
        ArrayList<String[]> assertions = new ArrayList<String[]>();

        if (assertionProviderList == null)
            return null;
        for (String method : assertionProviderList) {
View Full Code Here

TOP

Related Classes of net.sourceforge.marathon.component.MComponent

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.