Package hu.sztaki.ilab.longneck.process

Examples of hu.sztaki.ilab.longneck.process.VariableSpace


        List<String> applyTo = new ArrayList<String>(3);
        applyTo.add("a");

        islonger.setApplyTo(applyTo);
        Assert.assertFalse(islonger.check(r, new VariableSpace()).isPassed());

        applyTo = new ArrayList<String>(3);
        applyTo.add("b");

        islonger.setApplyTo(applyTo);
        Assert.assertFalse(islonger.check(r, new VariableSpace()).isPassed());

        applyTo = new ArrayList<String>(3);
        applyTo.add("c");

        islonger.setApplyTo(applyTo);
        Assert.assertTrue(islonger.check(r, new VariableSpace()).isPassed());

        applyTo = new ArrayList<String>(3);
        applyTo.add("d");

        islonger.setApplyTo(applyTo);
        Assert.assertTrue(islonger.check(r, new VariableSpace()).isPassed());

        applyTo = new ArrayList<String>(3);
        applyTo.add("d");
        applyTo.add("a");

        islonger.setApplyTo(applyTo);
        Assert.assertFalse(islonger.check(r, new VariableSpace()).isPassed());
    }
View Full Code Here


            List<String> applyTo = new ArrayList<String>(3);
            applyTo.add("d");
            applyTo.add("i");

            islonger.setApplyTo(applyTo);
            Assert.assertTrue(islonger.check(r, new VariableSpace()).isPassed());
        } catch (Exception ex) {
            Assert.fail("Method must not raise exception.");
        }
    }
View Full Code Here

            List<String> applyTo = new ArrayList<String>(3);
            applyTo.add("a");

            islonger.setApplyTo(applyTo);
            Assert.assertTrue(islonger.check(r, new VariableSpace()).isPassed());
        } catch (Exception ex) {
            Assert.fail("Method must not raise exception.");
        }
    }
View Full Code Here

public class CollapseWhitespaceTest {

    @Test
    public void testCase1() throws BlockError {
        Record r = new RecordImpl();
        VariableSpace scope = new VariableSpace();

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

        CollapseWhitespace cwsp = new CollapseWhitespace();
View Full Code Here

    }

    @Test
    public void testCase2() throws BlockError {
        Record r = new RecordImpl();
        VariableSpace scope = new VariableSpace();

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

        CollapseWhitespace cwsp = new CollapseWhitespace();
View Full Code Here

        Assert.assertEquals("Jamrik Árpádné Jenei Andrea", r.get("test").getValue());
    }
   
    @Test
    public void testNull() {
        VariableSpace scope = new VariableSpace();

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

        r.add(new Field("c", "cccc"));
        r.add(new Field("d", "ddd"));
       
      
        // Perform copy
        cut.apply(r, new VariableSpace());
       
        Assert.assertEquals("aaaa", r.get("a").getValue());
        Assert.assertEquals("bbbb", r.get("b").getValue());
        Assert.assertEquals("cccc", r.get("c").getValue());       
        Assert.assertEquals("ddd", r.get("d").getValue());       
View Full Code Here

            r.add(new Field("c", "cccc"));
            r.add(new Field("d", "ddd"));


            // Perform copy
            cut.apply(r, new VariableSpace());

            Assert.assertEquals("aaaaaa", r.get("a").getValue());
            Assert.assertEquals("bbbbb", r.get("b").getValue());
            Assert.assertEquals("cccc", r.get("c").getValue());
            Assert.assertEquals("ddd", r.get("d").getValue());
View Full Code Here

            r.add(new Field("c", "cccc"));
            r.add(new Field("d", "ddd"));


            // Perform copy
            cut.apply(r, new VariableSpace());

            Assert.assertEquals("", r.get("a").getValue());
        } catch (Exception ex) {
            Assert.fail("Method must not raise exception.");
        }
View Full Code Here

        r.add(new Field("c", "ccc"));
        r.add(new Field("d", "ddd"));
       
      
        // Perform copy
        copy.apply(r, new VariableSpace());
       
        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.VariableSpace

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.