Examples of DummyBlock


Examples of hu.sztaki.ilab.longneck.util.dummy.DummyBlock

     * Tests Case construct, and AbstractCompoundBlock, Sequence.
     */
    @Test
    public void testCase() {
        Case o = new Case();
        o.setBlocks(Arrays.asList(new Block[] { new DummyBlock(1), new DummyBlock(2) }));
       
        // Test correct class and differing object instances
        final Object ocopy = o.clone();       
        Assert.assertTrue(ocopy instanceof Case);
        Assert.assertFalse(o == ocopy);
       
        final Case copy = (Case) ocopy;
       
        // Test attributes
        Assert.assertEquals(Arrays.asList(new Block[] { new DummyBlock(1), new DummyBlock(2) }), copy.getBlocks());
        Assert.assertFalse(o.getBlocks() == copy.getBlocks());
        TestUtils.assertListItemsNotSame(o.getBlocks(), copy.getBlocks());
    }
View Full Code Here

Examples of hu.sztaki.ilab.longneck.util.dummy.DummyBlock

    }
   
    @Test
    public void testMatchExtract() {
        MatchExtract o = new MatchExtract();
        o.setBlocks(Arrays.asList(new Block[] { new DummyBlock(1), new DummyBlock(2) }));
       
       
        // Test correct class and differing object instances
        final Object ocopy = o.clone();       
        Assert.assertTrue(ocopy instanceof MatchExtract);
        Assert.assertFalse(o == ocopy);
       
        final MatchExtract copy = (MatchExtract) ocopy;
       
        // Test attributes
        Assert.assertEquals(Arrays.asList(new Block[] { new DummyBlock(1), new DummyBlock(2) }), copy.getBlocks());
        Assert.assertFalse(o.getBlocks() == copy.getBlocks());
        TestUtils.assertListItemsNotSame(o.getBlocks(), copy.getBlocks());       
    }
View Full Code Here

Examples of hu.sztaki.ilab.longneck.util.dummy.DummyBlock

    }
   
    @Test
    public void testSequence() {
        Sequence o = new Sequence();
        o.setBlocks(Arrays.asList(new Block[] { new DummyBlock(1), new DummyBlock(2) }));
       
        // Test correct class and differing object instances
        final Object ocopy = o.clone();       
        Assert.assertTrue(ocopy instanceof Sequence);
        Assert.assertFalse(o == ocopy);
       
        final Sequence copy = (Sequence) ocopy;
       
        // Test attributes
        Assert.assertEquals(Arrays.asList(new Block[] { new DummyBlock(1), new DummyBlock(2) }), copy.getBlocks());
        Assert.assertFalse(o.getBlocks() == copy.getBlocks());
        TestUtils.assertListItemsNotSame(o.getBlocks(), copy.getBlocks());       
    }
View Full Code Here

Examples of hu.sztaki.ilab.longneck.util.dummy.DummyBlock

    }
   
    @Test
    public void testExtractUnixtimestamp() {
      ExtractUnixtimestamp o = new ExtractUnixtimestamp();
         o.setBlocks(Arrays.asList(new Block[] { new DummyBlock(1), new DummyBlock(2) }));
        
        
         // Test correct class and differing object instances
         final Object ocopy = o.clone();       
         Assert.assertTrue(ocopy instanceof ExtractUnixtimestamp);
         Assert.assertFalse(o == ocopy);
        
         final ExtractUnixtimestamp copy = (ExtractUnixtimestamp) ocopy;
        
         // Test attributes
         Assert.assertEquals(Arrays.asList(new Block[] { new DummyBlock(1), new DummyBlock(2) }), copy.getBlocks());
         Assert.assertFalse(o.getBlocks() == copy.getBlocks());
         TestUtils.assertListItemsNotSame(o.getBlocks(), copy.getBlocks())
    }
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.