Examples of MCollectionComponent


Examples of net.sourceforge.marathon.component.MCollectionComponent

    @Test
    public void testAssertContent() {
        Object[] data = new Object[] { "a", "b", "c", "d", "e" };
        JList list = new JList(data);
        MCollectionComponent component = new MList(list, "JList", new ComponentFinder(Boolean.FALSE,
                WindowMonitor.getInstance().getNamingStrategy(), new ResolversProvider(),
                ScriptModelServerPart.getModelServerPart(), WindowMonitor.getInstance()), WindowMonitor.getInstance());
        ComponentFinder resolver = new DummyResolver(component);
        ActionTestCase.assertPasses(
                new AssertContent(ID, new String[][] { { "a", "b", "c", "d", "e" } }, ScriptModelServerPart.getModelServerPart(),
View Full Code Here

Examples of net.sourceforge.marathon.component.MCollectionComponent

    }

    public int getRowCount(ComponentId id) {
        if(failMessage != null)
            failX(failMessage);
        MCollectionComponent component = (MCollectionComponent) finder.getMComponentById(id);
        return component.getRowCount();
    }
View Full Code Here

Examples of net.sourceforge.marathon.component.MCollectionComponent

    }

    public String[][] getContent(ComponentId id) {
        if(failMessage != null)
            failX(failMessage);
        MCollectionComponent component = (MCollectionComponent) finder.getMComponentById(id);
        return component.getContent();
    }
View Full Code Here

Examples of net.sourceforge.marathon.component.MCollectionComponent

    }

    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++) {
            String[] actualElements = actualData[i];
            String[] expectedElements = content[i];
            assertEquals("Invalid Length at index " + i, Integer.valueOf(expectedElements.length), Integer.valueOf(actualElements.length));
            for (int j = 0; j < expectedElements.length; j++) {
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.