Skip to content

Commit

Permalink
Tests: Add test for classroom infos
Browse files Browse the repository at this point in the history
  • Loading branch information
leosarra committed Nov 1, 2018
1 parent eea0890 commit 6bab89f
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/test/java/lithium/openstud/driver/OpenstudTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import java.util.List;
import java.util.Map;
import java.util.logging.Logger;

import static org.junit.Assert.*;

Expand Down Expand Up @@ -92,15 +93,15 @@ public void testGetInfoStudent() throws OpenstudInvalidResponseException, Openst

@Test
public void testGetExamsDoable() throws OpenstudInvalidResponseException, OpenstudInvalidCredentialsException, OpenstudConnectionException, OpenstudUserNotEnabledException {
Openstud osb = new OpenstudBuilder().setPassword(System.getenv("OPENSTUD_TESTPWD")).setStudentID(System.getenv("OPENSTUD_TESTID")).build();
Openstud osb = new OpenstudBuilder().setPassword("Dead_mecell1").setStudentID("1693752").setLogger(Logger.getLogger("ciao")).build();
osb.login();
List<ExamDoable> list=osb.getExamsDoable();
assertNotNull(list);
}

@Test
public void testGetTimetable() throws OpenstudInvalidResponseException, OpenstudInvalidCredentialsException, OpenstudConnectionException, OpenstudUserNotEnabledException {
Openstud osb = new OpenstudBuilder().setPassword(System.getenv("OPENSTUD_TESTPWD")).setStudentID(System.getenv("OPENSTUD_TESTID")).build();
Openstud osb = new OpenstudBuilder().setPassword("Dead_mecell1").setStudentID("1693752").build();
osb.login();
List<ExamDoable> list=osb.getExamsDoable();
Map<String, List<Lesson>> map = osb.getTimetable(list);
Expand All @@ -124,6 +125,16 @@ public void testGetActiveReservations() throws OpenstudInvalidResponseException,
assertNotNull(list);
}

@Test
public void testClassroomInfos() throws OpenstudInvalidResponseException, OpenstudInvalidCredentialsException, OpenstudConnectionException, OpenstudUserNotEnabledException {
Openstud osb = new OpenstudBuilder().setPassword(System.getenv("OPENSTUD_TESTPWD")).setStudentID(System.getenv("OPENSTUD_TESTID")).build();
osb.login();
List<Classroom> list=osb.getClassRoom("San pietro");
System.out.println(list);
assertNotNull(list);
}


@Test
public void testGetAvailableReservations() throws OpenstudInvalidResponseException, OpenstudInvalidCredentialsException, OpenstudConnectionException, OpenstudUserNotEnabledException {
Openstud osb = new OpenstudBuilder().setPassword(System.getenv("OPENSTUD_TESTPWD")).setStudentID(System.getenv("OPENSTUD_TESTID")).build();
Expand Down

0 comments on commit 6bab89f

Please sign in to comment.