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

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


        VariableSpace scope = new VariableSpace();

        r.add(new Field("test"));
        r.get("test").setValue("Nagy  Hajnalka");

        CollapseWhitespace cwsp = new CollapseWhitespace();
        cwsp.setApplyTo(Arrays.asList(new String[] { "test" }));
        cwsp.apply(r, scope);

        Assert.assertEquals("Nagy Hajnalka", r.get("test").getValue());
    }
View Full Code Here


        VariableSpace scope = new VariableSpace();

        r.add(new Field("test"));
        r.get("test").setValue("Jamrik Árpádné   Jenei Andrea");

        CollapseWhitespace cwsp = new CollapseWhitespace();
        cwsp.setApplyTo(Arrays.asList(new String[] { "test" }));
        cwsp.apply(r, scope);

        Assert.assertEquals("Jamrik Árpádné Jenei Andrea", r.get("test").getValue());
    }
View Full Code Here

        Record r1 = new RecordImpl();
        r1.add(new Field("test"));
        r1.get("test").setValue(null);

        CollapseWhitespace cwsp = new CollapseWhitespace();
        cwsp.setApplyTo(Arrays.asList(new String[] { "test" }));
        cwsp.apply(r1, scope);
       
        Assert.assertNull(r1.get("test").getValue());
       
        cwsp.setApplyTo(Arrays.asList(new String[] { "testNotExists" }));
        cwsp.apply(r1, scope);
    }
View Full Code Here

TOP

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

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.