Package hu.sztaki.ilab.longneck.process.block

Examples of hu.sztaki.ilab.longneck.process.block.Copy


        copy.apply(r, scope);
    }
   
    @Test
    public void testExcessSpaceInApplyTo() throws BlockError {
        Copy copy = new Copy();
       
        copy.setApplyTo("    a    b  ");
        copy.setFrom("d");
       
        // Prepare record
        RecordImpl r = new RecordImpl();
        r.add(new Field("a", "aaa"));
        r.add(new Field("b", "bbb"));
        r.add(new Field("c", "ccc"));
        r.add(new Field("d", "ddd"));
       
        // Add variable scope
        VariableSpace scope = new VariableSpace();
       
        // Perform copy
        copy.apply(r, scope);
       
        assertEquals("ddd", r.get("a").getValue());
        assertEquals("ddd", r.get("b").getValue());
        assertEquals("ccc", r.get("c").getValue());       
    }   
View Full Code Here

TOP

Related Classes of hu.sztaki.ilab.longneck.process.block.Copy

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.