Package com.darkhonor.rage.model

Examples of com.darkhonor.rage.model.Instructor


    }

    private List<Instructor> createCheckInstructorList(Course course)
    {
        List<Instructor> instructors = new ArrayList<Instructor>();
        Instructor instructor1 = new Instructor("Alexander", "Ackerman", "Alexander.Ackerman");
        instructor1.setDomainAccount(instructor1.getWebID());
        Section section1;

        return instructors;
    }
View Full Code Here


                new Integer(2013));
        Student student4 = new Student("Andrew", "Callow", "C13Andrew.Callow",
                new Integer(2013));
        Section section1 = new Section("M1A");
        Section section2 = new Section("M2B");
        Instructor instructor1 = new Instructor("David", "Roberts", "David.Roberts");
        instructor1.setDomainAccount(instructor1.getWebID());
        Instructor instructor2 = new Instructor("Sarah", "O'Reilly", "Sarah.OReilly");
        instructor2.setDomainAccount(instructor2.getWebID());

        // Set the Instructors for Sections 1 & 2
        section1.setInstructor(instructor1);
        section2.setInstructor(instructor2);
View Full Code Here

                new Integer(2013));
        Student student5 = new Student("Kerry", "Beevers", "C11Kerry.Beevers",
                new Integer(2011));
        Section section1 = new Section("M2A");
        Section section2 = new Section("T1A");
        Instructor instructor1 = new Instructor("David", "Roberts", "David.Roberts");
        instructor1.setDomainAccount(instructor1.getWebID());

        // Set the Instructors for Sections 1 & 2
        section1.setInstructor(instructor1);
        section2.setInstructor(instructor1);
View Full Code Here

                    LOGGER.debug("Header information correct");
                    for (int i = 1; i < totalRows; i++)
                    {
                        LOGGER.debug("Parsing Instructor Row #" + i);
                        XSSFRow instructorRow = instructorSheet.getRow(i);
                        Instructor instructor = new Instructor();
                        instructor.setDomainAccount(instructorRow.getCell(0).getStringCellValue());
                        instructor.setWebID(instructorRow.getCell(0).getStringCellValue());
                        instructor.setPassword(instructorRow.getCell(1).getStringCellValue());
                        instructor.setFirstName(instructorRow.getCell(2).getStringCellValue());
                        instructor.setLastName(instructorRow.getCell(3).getStringCellValue());

                        /**
                         * The assumption is that all Course Sections will be
                         * identified prior to loading instructors.
                         */
                        Section importedSection = new Section();
                        importedSection.setName(instructorRow.getCell(4).getStringCellValue());
                        importedSection.setCourse(course);
                        int sectionIndex = sections.indexOf(importedSection);

                        int instructorIndex = instructors.indexOf(instructor);
                        if (instructorIndex > -1)
                        {
                            LOGGER.debug("Instructor is in the system");
                            instructors.get(instructorIndex).addSection(sections.get(sectionIndex));
                            sections.get(sectionIndex).setInstructor(instructors.get(instructorIndex));
                        } else
                        {
                            LOGGER.debug("Instructor is not in system");
                            instructor.addSection(sections.get(sectionIndex));
                            instructors.add(instructor);
                            sections.get(sectionIndex).setInstructor(instructor);
                        }
                        LOGGER.debug(instructor.getFirstName() + " "
                                + instructor.getLastName() + " teaches Section "
                                + sections.get(sectionIndex) + " with Login "
                                + instructor.getDomainAccount());
                    }
                }
            } catch (IllegalArgumentException ex)
            {
                LOGGER.error("Invalid Argument: " + ex.getLocalizedMessage());
View Full Code Here

    {
        System.out.println("getSectionsForCourseAndInstructor");
        Course course = new Course("CS110");
        course.setId(1L);
       
        Instructor instructor = new Instructor("Sarah", "O'Reilly",
                "Sarah.OReilly");
        instructor.setId(6L);
        instructor.setDomainAccount("Sarah.OReilly");
       
        ArrayList<Section> expectedResult = new ArrayList<Section>();
        Section section1 = new Section("M2B");
        section1.setId(2L);
        section1.setInstructor(instructor);
View Full Code Here

    {
        System.out.println("getSectionsForCourseAndInstructorMultSections");
        Course course = new Course("CS364");
        course.setId(2L);
       
        Instructor instructor = new Instructor("David", "Roberts",
                "David.Roberts");
        instructor.setId(5L);
        instructor.setDomainAccount("David.Roberts");
       
        ArrayList<Section> expectedResults = new ArrayList<Section>();
        Section section1 = new Section("T5A");
        section1.setId(3L);
        section1.setInstructor(instructor);
View Full Code Here

    {
        System.out.println("getSectionsForCourseAndInstructorNoResult");
        Course course = new Course("CS364");
        course.setId(2L);

        Instructor instructor = new Instructor("Sarah", "O'Reilly",
                "Sarah.OReilly");
        instructor.setId(6L);
        instructor.setDomainAccount("Sarah.OReilly");

        assertTrue(instance.isOpen());
        List results = instance.getSectionsForCourseAndInstructor(course, instructor);
        System.out.println("- Results Size (expecting 0): " + results.size());
        assertEquals(0, results.size());
View Full Code Here

    public void testGetSectionsForCourseAndInstructorNullCourse()
    {
        System.out.println("getSectionsForCourseAndInstructorNullCourse");
        Course course = null;

        Instructor instructor = new Instructor("Sarah", "O'Reilly",
                "Sarah.OReilly");
        instructor.setId(6L);
        instructor.setDomainAccount("Sarah.OReilly");
        assertTrue(instance.isOpen());
        List results = instance.getSectionsForCourseAndInstructor(course, instructor);
    }
View Full Code Here

    {
        System.out.println("getSectionsForCourseAndInstructorNullInstructor");
        Course course = new Course("CS110");
        course.setId(1L);

        Instructor instructor = null;
        assertTrue(instance.isOpen());
        List results = instance.getSectionsForCourseAndInstructor(course, instructor);
    }
View Full Code Here

    {
        System.out.println("getSectionsForCourseAndInstructorClosedConnection");
        Course course = new Course("CS110");
        course.setId(1L);

        Instructor instructor = new Instructor("Sarah", "O'Reilly",
                "Sarah.OReilly");
        instructor.setId(6L);
        instructor.setDomainAccount("Sarah.OReilly");

        assertTrue(instance.isOpen());
        instance.closeConnection();
        assertFalse(instance.isOpen());
        List results = instance.getSectionsForCourseAndInstructor(course, instructor);
View Full Code Here

TOP

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

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.