Package model

Examples of model.Student


        System.out.println(student10.toString() + " wurde erfolgreich von der " + lva4.toString2() + " abgemeldet.");
        lvaService.unregister(student12, lva4);
        System.out.println(student12.toString() + " wurde erfolgreich von der " + lva4.toString2() + " abgemeldet.");

        try {
            lvaService.unregister(new Student(1, "John", "Doe"), unknownLva);
            fail();
        } catch (AppointmentNotFoundException ex) {
            // This has to happen
        }

        try {
            lvaService.unregister(new Student(1, "John", "Doe"), lva1);
            fail();
        } catch (NotRegisteredException ex) {
            // This has to happen
        }

        try {
            lvaService.unregister(new Student(1, "John", "Doe"), lva3);
            fail();
        } catch (UnregisterPeriodOverException ex) {
            // This has to happen
        }

        try {    // aus der Lva kann man sich nicht mehr abmelden
            lvaService.unregister(new Student(12, "Christopher", "Turk"), lva6);
            fail();
        } catch (UnregisterPeriodOverException ex) {
            // This has to happen
        }
    }
View Full Code Here


        Date tomorrow = new Date(new Date().getTime() + 1000 * 60 * 60 * 24);

        Lecturer lect3 = new Lecturer("Peter", "Zaruba");
        Lecturer lect2 = new Lecturer("Frans", "Zimmer");

        Student s1 = new Student(1025748, "Florian", "Zaruba");
        Interview i1 = new Interview(2000, yesterday, tomorrow, yesterday, yesterday, yesterday, lect3, 30, new ArrayList<User>());

        scoreService.score(lect3, s1, i1, 20);
        assertNotEmpty(scoreService.getScores(lect3, i1, s1));

        System.out.println("User: " + s1.getMatriculationNr() + " was successfully scored for " + i1 + " by " + lect3);

        try {
            scoreService.score(lect2, new Student(1025748, "Florian", "Zaruba"), new Interview(2000, yesterday, tomorrow, yesterday, yesterday, yesterday, lect3, 30, new ArrayList<User>()), 40);
            fail();
        } catch (NotAllowedException e) {
            System.out.println("Sucessfully tested UserNotAllowed Exception for Scoring!");
        }
    }
View Full Code Here

        Date endAppointment = new Date(new Date().getTime() + 1000 * 60 * 60 * 24 * 365);

        Lecturer lect1 = new Lecturer("Heinz", "Huber");

        Lva lva1 = new Lva(1, "OOP", today, endAppointment, yesterday, yesterday, tomorrow, lect1, 5, null, null, null, 1, new ArrayList<Exam>(), new ArrayList<PracticeGroup>(), new ArrayList<Interview>(), Arrays.asList((User) lect1));
        Student s1 = new Student(1025748, "Florian", "Zaruba");

        ratingService.rate(lect1, s1, lva1, Grade.A);

        try {
            ratingService.rate(lect1, s1, lva1, Grade.B);
            fail();
        } catch (RateLimitExceededException ex) {
            // This has to happen
        }
        assertTrue(ratingService.getRatings(lect1, lva1, s1).size() == 1);
        System.out.println("User: " + s1.getMatriculationNr() + " was successfully scored for " + lva1 + " by " + lect1);

        try {
            ratingService.rate(s1, s1, lva1, Grade.A);
            fail();
        } catch (NotAllowedException e) {
View Full Code Here

TOP

Related Classes of model.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.