l# RestAppHotelbooking
Create REST application Hotel booking
With capabilities (each represented by separate endpoint):
- View list of available rooms (room have a number, category, price, additional options like breakfast, cleaning with additional cost) for specified dates.
- View rooms filtered by category.
- Create user.
- User can book the room for specified days.
- User can view his booking.
- User can get the total price of the booking (room for dates period + cost of additional options).
- View all bookings for the hotel. Authentication and authorization are not included in the task. Requirements:
- Source code must be stored on GitHub with access to the repository.
- The repository must contain file README.MD with instructions for launching the application and any other necessary documentation for the application (in English).
- Running the application should not require a standalone application server (application should run on embedded tomcat server) or installation of any software except Java and maven.
- The project should contain SQL-script for creating database tables and filling them with data necessary to test application.
- The project should be covered with unit tests.
- Availability of UML class diagram is a plus. "Instructions for launching the application" Tech stack: Java 8, Spring Boot, Spring MVC, Spring Data, Hibernate, H2, maven.
- datascript.sql - SQL-script for creating database tables and filling them with data necessary to test application.
- View list of available rooms - "http://localhost:8080/room/available"
- View rooms filtered by category - "http://localhost:8080/find/category/{name}". Name - "KINGROOM", "LUXROOM", "LOSERROOM".
- Create user - "http://localhost:8080/room/saveUser"
- User can book the room for specified days - "http://localhost:8080/room/book"
- User can view his booking - "http://localhost:8080//findBookingUser/{userID}"
- User can get the total price of the booking (room for dates period + cost of additional options).
- View all bookings for the hotel - "http://localhost:8080/findallBooking"
Unit tests:
- Positive and Negative test to "View List of available rooms".
- Positive and Negative test to "Create user".
- Positive and Negative test to "View rooms filtered by category".