Code Monkey home page Code Monkey logo

parkingsystem's People

Contributors

avinash-dev avatar docky37 avatar

Watchers

 avatar

parkingsystem's Issues

No tests found with test runner 'JUnit 5'

Pop-up "Could not run test" with "No tests found with test runner 'JUnit 5'" message when trying to run individual test with right click & Run AS Junit test.
Console :
java.lang.NoClassDefFoundError: org/junit/platform/commons/PreconditionViolationException
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.createUnfilteredTest(JUnit5TestLoader.java:75)
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.createTest(JUnit5TestLoader.java:66)
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.loadTests(JUnit5TestLoader.java:53)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:525)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
Caused by: java.lang.ClassNotFoundException: org.junit.platform.commons.PreconditionViolationException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more

STORY#1 : Task 2 - Code for Free 30-min parking

As a user, I want to be able to park for a short amount of time without having to pay.

We decided to allow our users to park for free when they stay less than 30 min, especially since some people might go into the parking garage, not find a spot, then leave immediately after.

In this scenario, the user enters the car park after entering their license plate number. The user gets out of the parking garage by providing their number again. If they have stayed for under 30 minutes, they don't need to pay anything. The fee should be $0.

Tasks

  1. Write the unit test that checks this behavior
    2. Implement the feature in the code

STORY#2 : Task 1 - Unit Test for 5%-discount for recurring users

As a user, I want to get a discount when I use the parking garage regularly.

In order to improve user retention, we decided to offer recurring users a 5% discount every time they come back to our parking lot.

  1. When a user enters the parking garage, they are asked for their license plate number.
  2. When entering it, the system checks whether the user has entered it previously.
  3. If this is the case, then the system displays a message saying "Welcome back! As a recurring user of our parking lot, you'll benefit from a 5% discount." and then proceeds normally.
  4. When the user exits the parking garage, they will benefit from a 5% discount on the normal fee.

Tasks

  1. Write the unit test that checks this behavior
  2. Implement the feature in the code

STORY#1 : Task1 - Unit test for Free 30-min parking

As a user, I want to be able to park for a short amount of time without having to pay.

We decided to allow our users to park for free when they stay less than 30 min, especially since some people might go into the parking garage, not find a spot, then leave immediately after.

In this scenario, the user enters the car park after entering their license plate number. The user gets out of the parking garage by providing their number again. If they have stayed for under 30 minutes, they don't need to pay anything. The fee should be $0.

Tasks

1. Write the unit test that checks this behavior
2. Implement the feature in the code

STORY#2 : Task 2 - Code for 5%-discount for recurring users

As a user, I want to get a discount when I use the parking garage regularly.

In order to improve user retention, we decided to offer recurring users a 5% discount every time they come back to our parking lot.

  1. When a user enters the parking garage, they are asked for their license plate number.
  2. When entering it, the system checks whether the user has entered it previously.
  3. If this is the case, then the system displays a message saying "Welcome back! As a recurring user of our parking lot, you'll benefit from a 5% discount." and then proceeds normally.
  4. When the user exits the parking garage, they will benefit from a 5% discount on the normal fee.

Tasks

  1. Write the unit test that checks this behavior
  2. Implement the feature in the code

Fix Checkstyle errors

First Checkstyle Results : 362 errors

7 in com/parkit/parkingsystem/App.java | 0 | 0 | 7
32 in com/parkit/parkingsystem/config/DataBaseConfig.java | 0 | 0 | 32
2 in com/parkit/parkingsystem/config/package-info.java | 0 | 0 | 2
15 in com/parkit/parkingsystem/constants/DBConstants.java | 0 | 0 | 15
6 in com/parkit/parkingsystem/constants/Fare.java | 0 | 0 | 6
2 in com/parkit/parkingsystem/constants/ParkingType.java | 0 | 0 | 2
2 in com/parkit/parkingsystem/constants/package-info.java | 0 | 0 | 2
5 in com/parkit/parkingsystem/dao/IParkingSpotDAO.java | 0 | 0 | 5
8 in com/parkit/parkingsystem/dao/ITicketDAO.java | 0 | 0 | 8
35 in com/parkit/parkingsystem/dao/ParkingSpotDAO.java | 0 | 0 | 35
55 in com/parkit/parkingsystem/dao/TicketDAO.java | 0 | 0 | 55
2 in com/parkit/parkingsystem/dao/package-info.java | 0 | 0 | 2
25 in com/parkit/parkingsystem/model/ParkingSpot.java | 0 | 0 | 25
51 in com/parkit/parkingsystem/model/Ticket.java | 0 | 0 | 51
2 in com/parkit/parkingsystem/model/package-info.java | 0 | 0 | 2
28 in com/parkit/parkingsystem/service/FareCalculatorService.java | 0 | 0 | 28
4 in com/parkit/parkingsystem/service/IFareCalculatorService.java | 0 | 0 | 4
5 in com/parkit/parkingsystem/service/IParkingService.java | 0 | 0 | 5
10 in com/parkit/parkingsystem/service/InteractiveShell.java | 0 | 0 | 10
43 in com/parkit/parkingsystem/service/ParkingService.java | 0 | 0 | 43
2 in com/parkit/parkingsystem/service/package-info.java | 0 | 0 | 2
4 in com/parkit/parkingsystem/util/IImputReaderUtil.java | 0 | 0 | 4
13 in com/parkit/parkingsystem/util/InputReaderUtil.java | 0 | 0 | 13
2 in com/parkit/parkingsystem/util/package-info.java | 0 | 0 | 2
1 in db.properties | 0 | 0 | 1
1 in log4j2.properties | 0 | 0 | 1

java.sql.SQLException

ERROR ParkingSpotDAO - Error fetching next available slot
java.sql.SQLException: The server time zone value 'Paris, Madrid' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to use a more specifc time zone value if you want to utilize time zone support.

Integration Test dependency

The integration test testParkingLotExit() start with a call off another integration test (testParkingACar()).

Integration test ocasionally fails

Sometimes the Integration test fails.
It appends when updateInTime in DataBasePrepareService rounded up IN_TIME.
For example IN_TIME = ...14:40:58 and OUT_TIME = ...15:40:57.9238
In this case, duration is equal to 59 minutes instead of 1 hour and rate is equal to 1.47 instead of 1.50 โ‚ฌ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.