Package org.javalite.activejdbc.test_models

Examples of org.javalite.activejdbc.test_models.Student


    @Test
    public void test(){

        deleteAndPopulateTables("students", "courses", "registrations");
       
        Student student = Student.findById(1);
        List<Course> courses = student.getAll(Course.class);
        a(2).shouldBeEqual(courses.size());

        student = Student.findById(2);
        courses = student.getAll(Course.class);
        a(1).shouldBeEqual(courses.size());

        Course c = Course.findById(1);
        List<Student> Students = c.getAll(Student.class);
        a(2).shouldBeEqual(Students.size());
View Full Code Here

TOP

Related Classes of org.javalite.activejdbc.test_models.Student

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.