Package hu.sztaki.ilab.longneck.util.dummy

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


     * Tests strict switch and AbstractSwitch.
     */
    @Test
    public void testSwitchStrict() {
        SwitchStrict o = new SwitchStrict();
        o.setCases(Arrays.asList(new Case[] { new DummyCase(1), new DummyCase(2) }));
        // Test correct class and differing object instances
        final Object ocopy = o.clone();       
        Assert.assertTrue(ocopy instanceof SwitchStrict);
        Assert.assertFalse(o == ocopy);       
       
        final SwitchStrict copy = (SwitchStrict) ocopy;
       
        // Test cases
        Assert.assertEquals(Arrays.asList(new Case[] { new DummyCase(1), new DummyCase(2) }), copy.getCases());
        Assert.assertEquals(Arrays.asList(new Case[] { new DummyCase(1), new DummyCase(2) }), copy.getBlocks());
        Assert.assertFalse(o.getCases() == copy.getCases());
        TestUtils.assertListItemsNotSame(o.getCases(), copy.getCases());
    }
View Full Code Here

TOP

Related Classes of hu.sztaki.ilab.longneck.util.dummy.DummyCase

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.