Package com.darkhonor.rage.model

Examples of com.darkhonor.rage.model.Course


    public void testFindIdNoResult()
    {
        System.out.println("findIdNoResult");
        assertTrue(instance.isOpen());
        Long resultId = new Long(12L);
        Course result = instance.find(resultId);
        assertNull(result);
    }
View Full Code Here


    public void testFindIdLessThanZero()
    {
        System.out.println("findIdLessThanZero");
        assertTrue(instance.isOpen());
        Long resultId = new Long(-3L);
        Course result = instance.find(resultId);
    }
View Full Code Here

    public void testFindIdZero()
    {
        System.out.println("findIdZero");
        assertTrue(instance.isOpen());
        Long resultId = new Long(0L);
        Course result = instance.find(resultId);
    }
View Full Code Here

    public void testFindIdNull()
    {
        System.out.println("findIdNull");
        assertTrue(instance.isOpen());
        Long nullId = null;
        Course result = instance.find(nullId);
    }
View Full Code Here

        System.out.println("findIdClosedConnection");
        assertTrue(instance.isOpen());
        instance.closeConnection();
        assertFalse(instance.isOpen());
        Long resultId = new Long(2L);
        Course result = instance.find(resultId);
    }
View Full Code Here

    public void testFindName()
    {
        System.out.println("find - by Name");
        assertTrue(instance.isOpen());
        String courseName = "CS364";
        Course dbCourse = instance.find(courseName);
        assertNotNull(dbCourse);
        assertEquals("CS364", dbCourse.getName());
        Long expectedId = new Long(2L);
        assertEquals(expectedId, dbCourse.getId());
        assertEquals(1, dbCourse.getInstructors().size());
        assertEquals(2, dbCourse.getSections().size());
    }
View Full Code Here

    public void testFindNameNoResult()
    {
        System.out.println("findNameNoResult");
        assertTrue(instance.isOpen());
        String courseName = "CS194P";
        Course result = instance.find(courseName);
        assertNull(result);
    }
View Full Code Here

    public void testFindNameBlank()
    {
        System.out.println("findNameBlank");
        assertTrue(instance.isOpen());
        String courseName = "";
        Course result = instance.find(courseName);
    }
View Full Code Here

    public void testFindNameNull()
    {
        System.out.println("findNameNull");
        assertTrue(instance.isOpen());
        String courseName = null;
        Course result = instance.find(courseName);
    }
View Full Code Here

        System.out.println("findNameClosedConnection");
        assertTrue(instance.isOpen());
        instance.closeConnection();
        assertFalse(instance.isOpen());
        String courseName = "CS364";
        Course result = instance.find(courseName);
    }
View Full Code Here

TOP

Related Classes of com.darkhonor.rage.model.Course

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.