Examples of ArmEncapsulator


Examples of net.sf.laja.cdd.behaviour.arm.ArmEncapsulator

public class EncapsulationTest {

    @Test (expected = IllegalStateException.class)
    public void modifyEncapsulatedObject_viaTheEncapsulator() {
        ArmEncapsulator encapsulator = Arm.armWeight(10);
        encapsulator.asArm();

        // Trying to modify state after encapsulation.
        encapsulator.withArmLength(20);
    }
View Full Code Here

Examples of net.sf.laja.cdd.behaviour.arm.ArmEncapsulator

        builder.withArmLength(10);
    }

    @Test (expected = IllegalStateException.class)
    public void modifyEncapsulatedList() {
        ArmEncapsulator encapsulator = Arm.armWeight(1);
        Arm.createList(encapsulator).asArmList();

        // Trying to modify state of an element after encapsulation of the list.
        encapsulator.withArmLength(3);
    }
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.