DataHandler update
authorMatthias <balmm1@bfh.ch>
Fri, 27 Nov 2015 11:05:36 +0000 (12:05 +0100)
committerMatthias <balmm1@bfh.ch>
Fri, 27 Nov 2015 11:05:36 +0000 (12:05 +0100)
src/main/java/ch/bfh/ti/srs/datahandler/DataHandlerForTests.java

index f8939da..f699888 100644 (file)
@@ -175,6 +175,9 @@ public class DataHandlerForTests implements DataHandler {
                                if (res.getId() == reservation.getId()){
                                        return false;
                                }
+                               else if(res.getResource() == reservation.getResource() && res.getDateRange().overlaps(reservation.getDateRange())){
+                                       return false;
+                               }
                        }
                        reservationList.add(reservation);
                        return true;