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

Examples of hu.sztaki.ilab.longneck.process.block.CollapseWhitespace.apply()


        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());
    }

    @Test
View Full Code Here


        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());
    }
   
    @Test
View Full Code Here

        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

        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
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.