Package uk.org.ogsadai.activity

Examples of uk.org.ogsadai.activity.MockOutputPipe


       
        activity.addInput(ConvertToTupleActivity.INPUT_NAME, nameInput);
        activity.addInput(ConvertToTupleActivity.INPUT_TYPE, typeInput);
        activity.addInput(ConvertToTupleActivity.INPUT_DATA, dataInput);
       
        MockOutputPipe output = new MockOutputPipe(new Object[] {});
        activity.addOutput(ConvertToTupleActivity.OUTPUT, output);
       
        activity.process();
              
        List blocks = output.getActualBlocks();
        TupleMetadata meta = (TupleMetadata) ((MetadataWrapper) blocks.get(1)).getMetadata();
       
        assertEquals("column name is different", name, meta.getColumnMetadata(0).getName());
        assertEquals("column type is different", type, meta.getColumnMetadata(0).getType());
       
View Full Code Here


       
        activity.addInput(ClassifyActivity.INPUT_RESULT_COLUMN_NAME, nameInput);
        activity.addInput(ClassifyActivity.INPUT_CLASSIFIER, classifierInput);
        activity.addInput(ClassifyActivity.INPUT_DATA, dataInput);
       
        MockOutputPipe output = new MockOutputPipe(new Object[] {});
        activity.addOutput(ClassifyActivity.OUTPUT, output);
       
        activity.process();
              
        List blocks = output.getActualBlocks();

       
      // Tuple tuple = (Tuple) blocks.get(3);
      // assertEquals("data1 is different", data1, tuple.getString(0));
          
View Full Code Here

                createTuple(new Object[] {2, 3}),
                createTuple(new Object[] {4, 7}),
                ControlBlock.LIST_END
        });
       
        MockOutputPipe output = new MockOutputPipe(new Object[] {});
        activity.addInput("data", input);
        activity.addOutput("result", output);
       
        activity.process();
       
        Iterator blocks = output.getActualBlocks().iterator();
        assertTrue(blocks.hasNext());
        assertEquals(ControlBlock.LIST_BEGIN, blocks.next());
        assertTrue(blocks.hasNext());
        Object block = blocks.next();
        assertTrue(block instanceof MetadataWrapper);
View Full Code Here

TOP

Related Classes of uk.org.ogsadai.activity.MockOutputPipe

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.