Examples of Motherboard


Examples of org.javalite.activejdbc.test_models.Motherboard

    }

    @Test(expected = IllegalArgumentException.class)
    public void shouldRejectNewParent(){
        Computer c = new Computer();
        c.setParent(new Motherboard());
    }
View Full Code Here

Examples of org.javalite.activejdbc.test_models.Motherboard


    @Test
    public void shouldAcceptTwoParents(){

        Motherboard m = Motherboard.createIt("description", "board 1");
        Keyboard k = Keyboard.createIt("description", "blah");

        Computer c = new Computer();
        c.setParent(m);
        c.setParent(k);
        c.save();

        c = Computer.findById(c.getId());
        a(c.get(m.getIdName())).shouldBeEqual(m.getId());
        a(c.get(k.getIdName())).shouldBeEqual(k.getId());
    }
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.