Update Reservation and ReservationTest classes.
[staff/due1/sed-hs15-srs-purple.git] / src / test / java / ch / bfh / ti / srs / dataschema / ReservationTest.java
index a860f60..12225b6 100644 (file)
@@ -36,12 +36,12 @@ public class ReservationTest {
                User testUser = new User("TestUser", "pass");\r
                Resource testResource = new Resource("N321", "class room");\r
                DateRange testDr = factory.createDateRange(DateFactory.createDate(2015, 11, 9), DateFactory.createDate(2015, 11, 13));\r
-               Reservation testReservation = new Reservation("TestReservation", testUser, testResource, testDr);\r
+               Reservation testReservation = new Reservation(testUser, testResource, testDr, "TestReservation");\r
                \r
-               assertEquals("TestReservation", testReservation.getName());\r
                assertEquals(testUser, testReservation.getUser());\r
                assertEquals(testResource, testReservation.getResource());\r
                assertEquals(testDr, testReservation.getDateRange());\r
+               assertEquals("TestReservation", testReservation.getRemark());\r
        }       \r
        \r
        @Test\r
@@ -49,10 +49,10 @@ public class ReservationTest {
                User testUser = new User("TestUser", "pass");\r
                Resource testResource = new Resource("N321", "class room");\r
                DateRange testDr = factory.createDateRange(DateFactory.createDate(2015, 11, 9), DateFactory.createDate(2015, 11, 13));\r
-               Reservation testReservation = new Reservation("TestReservation", testUser, testResource, testDr);\r
+               Reservation testReservation = new Reservation(testUser, testResource, testDr, "TestReservation");\r
                \r
-               testReservation.setName("otherTestReservation");\r
-               assertEquals("otherTestReservation", testReservation.getName());\r
+               testReservation.setRemark("otherTestReservation");\r
+               assertEquals("otherTestReservation", testReservation.getRemark());\r
        }\r
        \r
        @Test\r
@@ -60,7 +60,7 @@ public class ReservationTest {
                User testUser = new User("TestUser", "pass");\r
                Resource testResource = new Resource("N321", "class room");\r
                DateRange testDr = factory.createDateRange(DateFactory.createDate(2015, 11, 9), DateFactory.createDate(2015, 11, 13));\r
-               Reservation testReservation = new Reservation("TestReservation", testUser, testResource, testDr);\r
+               Reservation testReservation = new Reservation(testUser, testResource, testDr, "TestReservation");\r
                \r
                User otherTestUser = new User("otherTestUser", "pass");\r
                testReservation.setUser(otherTestUser);\r
@@ -72,7 +72,7 @@ public class ReservationTest {
                User testUser = new User("TestUser", "pass");\r
                Resource testResource = new Resource("N321", "class room");\r
                DateRange testDr = factory.createDateRange(DateFactory.createDate(2015, 11, 9), DateFactory.createDate(2015, 11, 13));\r
-               Reservation testReservation = new Reservation("TestReservation", testUser, testResource, testDr);\r
+               Reservation testReservation = new Reservation(testUser, testResource, testDr, "TestReservation");\r
                \r
                Resource OtherTestResource = new Resource("N421", "lecture hall");\r
                testReservation.setResource(OtherTestResource);\r
@@ -84,7 +84,7 @@ public class ReservationTest {
                User testUser = new User("TestUser", "pass");\r
                Resource testResource = new Resource("N321", "class room");\r
                DateRange testDr = factory.createDateRange(DateFactory.createDate(2015, 11, 9), DateFactory.createDate(2015, 11, 13));\r
-               Reservation testReservation = new Reservation("TestReservation", testUser, testResource, testDr);\r
+               Reservation testReservation = new Reservation(testUser, testResource, testDr, "TestReservation");\r
                \r
                DateRange otherTestDr = factory.createDateRange(DateFactory.createDate(2015, 12, 9), DateFactory.createDate(2015, 12, 13));\r
                testReservation.setDateRange(otherTestDr);\r