Examples of FakeDataManager


Examples of org.teiid.query.processor.FakeDataManager

            Arrays.asList(new Object[] { "2" }) }; //$NON-NLS-1$
        List[] expected = new List[] {
            Arrays.asList(new Object[] { "a" })//$NON-NLS-1$
            Arrays.asList(new Object[] { "b" }) }; //$NON-NLS-1$

        FakeDataManager dataMgr = new FakeDataManager();
        dataMgr.setThrowBlocked(true);
        Map valueMap = new HashMap();
        valueMap.put("1", "a"); //$NON-NLS-1$ //$NON-NLS-2$
        valueMap.put("2", "b"); //$NON-NLS-1$ //$NON-NLS-2$
        dataMgr.defineCodeTable("pm1.g1", "e1", "e2", valueMap); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
        
        helpTestProject(projectElements, data, elements, expected, dataMgr);       
    }   
View Full Code Here

Examples of org.teiid.query.processor.FakeDataManager

public class TestUnionAllNode {

    public void helpTestUnion(RelationalNode[] children, RelationalNode union, List[] expected) throws TeiidComponentException, TeiidProcessingException {
        BufferManager mgr = NodeTestUtil.getTestBufferManager(1, 2);
        CommandContext context = new CommandContext("pid", "test", null, null, 1);               //$NON-NLS-1$ //$NON-NLS-2$
        FakeDataManager fdm = new FakeDataManager();
        for(int i=0; i<children.length; i++) {
            union.addChild(children[i]);
            children[i].initialize(context, mgr, fdm);
        }
       
View Full Code Here

Examples of org.teiid.query.processor.FakeDataManager

        AccessNode node = new AccessNode(1);
        node.setCommand(command);
        CommandContext context = new CommandContext();
        context.setProcessorID("processorID"); //$NON-NLS-1$
        BufferManager bm = BufferManagerFactory.getStandaloneBufferManager();
        FakeDataManager dataManager = new FakeDataManager();
        TestProcessor.sampleData1(dataManager);
        node.setElements(command.getProjectedSymbols());
        node.initialize(context, bm, dataManager);
        node.setShouldEvaluateExpressions(true);
        // Call open()
        node.open();
        if (shouldRegisterRequest) {
          assertEquals(Arrays.asList(expectedCommand), dataManager.getQueries());
        } else {
          assertEquals(0, dataManager.getQueries().size());
        }
    }
View Full Code Here

Examples of org.teiid.query.processor.FakeDataManager

      Query query = (Query)TestResolver.helpResolve("SELECT e1, e2 FROM pm1.g1 WHERE e2 = 5", FakeMetadataFactory.example1Cached()); //$NON-NLS-1$
        node.setCommand(query);
        CommandContext context = new CommandContext();
        context.setProcessorID("processorID"); //$NON-NLS-1$
        BufferManager bm = BufferManagerFactory.getStandaloneBufferManager();
        FakeDataManager dataManager = new FakeDataManager();
        TestProcessor.sampleData1(dataManager);
        node.setElements(query.getProjectedSymbols());
        node.initialize(context, bm, dataManager);
        // Call open()
        node.open();
        assertEquals(Arrays.asList("SELECT e1, e2 FROM pm1.g1 WHERE e2 = 5"), dataManager.getQueries()); //$NON-NLS-1$
    }
View Full Code Here

Examples of org.teiid.query.processor.FakeDataManager

    }
   
    /**  CSE query 5a */
    @Test public void testSelectElement22a() throws Exception {
        FakeMetadataFacade metadata = exampleMetadataNestedWithSibling();
        FakeDataManager dataMgr = exampleDataManagerNestedWithSibling(metadata);

        String expectedDoc =
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" //$NON-NLS-1$
            "<Catalogs>\r\n" + //$NON-NLS-1$
            "    <Catalog>\r\n" //$NON-NLS-1$
View Full Code Here

Examples of org.teiid.query.processor.FakeDataManager

    }
   
    /**  CSE query 6 */
    @Test public void testSelectElement23() throws Exception {
        FakeMetadataFacade metadata = exampleMetadataNestedWithSibling();
        FakeDataManager dataMgr = exampleDataManagerNestedWithSibling(metadata);

        String expectedDoc =
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" //$NON-NLS-1$
            "<Catalogs>\r\n" + //$NON-NLS-1$
            "    <Catalog>\r\n" //$NON-NLS-1$
View Full Code Here

Examples of org.teiid.query.processor.FakeDataManager

    }
   
    /**  CSE query 6a */
    @Test public void testSelectElement23a() throws Exception {
        FakeMetadataFacade metadata = exampleMetadataNestedWithSibling();
        FakeDataManager dataMgr = exampleDataManagerNestedWithSibling(metadata);
        String expectedDoc =
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" //$NON-NLS-1$
            "<Catalogs>\r\n" + //$NON-NLS-1$
            "    <Catalog>\r\n" //$NON-NLS-1$
            "        <Items>\r\n" //$NON-NLS-1$
View Full Code Here

Examples of org.teiid.query.processor.FakeDataManager

    }
                    
    /** test with order by and the element in the criteria is not in the select elements*/
    @Test public void testSelectElement24() throws Exception {
        FakeMetadataFacade metadata = exampleMetadataNestedWithSibling();
        FakeDataManager dataMgr = exampleDataManagerNestedWithSibling(metadata);
        String expectedDoc =
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" //$NON-NLS-1$
            "<Catalogs>\r\n" + //$NON-NLS-1$
            "    <Catalog>\r\n" //$NON-NLS-1$
            "        <Items>\r\n" //$NON-NLS-1$
View Full Code Here

Examples of org.teiid.query.processor.FakeDataManager

    }

    /** test element.* with order by and the element in the criteria is not in the select elements*/
    @Test public void testSelectElement24a() throws Exception {
        FakeMetadataFacade metadata = exampleMetadataNestedWithSibling();
        FakeDataManager dataMgr = exampleDataManagerNestedWithSibling(metadata);
        String expectedDoc =
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" //$NON-NLS-1$
            "<Catalogs>\r\n" + //$NON-NLS-1$
            "    <Catalog>\r\n" //$NON-NLS-1$
            "        <Items>\r\n" //$NON-NLS-1$
View Full Code Here

Examples of org.teiid.query.processor.FakeDataManager

    }
                        
    /** test with order by with only necessary sub-mapping classes are queried*/
    @Test public void testSelectElement25() throws Exception {
        FakeMetadataFacade metadata = exampleMetadataNestedWithSibling();
        FakeDataManager dataMgr = exampleDataManagerNestedWithSibling(metadata);
        String expectedDoc =
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" //$NON-NLS-1$
            "<Catalogs>\r\n" + //$NON-NLS-1$
            "    <Catalog>\r\n" //$NON-NLS-1$
            "        <Items>\r\n" //$NON-NLS-1$
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.