Skip to content

Commit

Permalink
Fixed unit test vehicle
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-a-git committed May 1, 2022
1 parent da67bb5 commit d95b186
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,25 @@ Welcome to CSIT314 project repo for RoadSideAssistance Application
You will need to install
- Docker
- Node.js
- JDK17
- JDK18

Recommended
- Intellij
- Postman

## Maven install commands
## install dependencies
mvn clean install

## Build
mvn -B package --file pom.xml

## Test
mvn --batch-mode -Dmaven.test.failure.ignore=true test

## Run
mvn run

## Running Backend and Frontend

To start the application (backend and front end) we first need to create a mysql db via docker. Then we can run the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ void testVehicleState() {
void testVehicleColour() {
Vehicle test = new Vehicle("AB12CD", "NSW", Year.of(2000),
"Toyota", "Corolla", "Blue", 2000.2);
assertEquals(test.getColour(), "Red", "Checking Colour");
assertEquals(test.getColour(), "Blue", "Checking Colour");
}

@Test
@DisplayName("Simple test of vehicle colour method")
@DisplayName("Simple test of vehicle year method")
void testVehicleYear() {
Vehicle test = new Vehicle("AB12CD", "NSW", Year.of(2000),
"Toyota", "Corolla", "Blue", 2000.2);
Expand All @@ -68,11 +68,11 @@ void testVehicleMake() {
}

@Test
@DisplayName("Simple test of vehicle make")
@DisplayName("Simple test of vehicle Model")
void testVehicleModel() {
Vehicle test = new Vehicle("AB12CD", "NSW", Year.of(2000),
"Toyota", "Corolla", "Blue", 2000.2);
assertEquals(test.getManufacturer(), "Toyota", "Checking Make");
assertEquals(test.getModel(), "Corolla", "Checking Model");
}

@Test
Expand Down

0 comments on commit d95b186

Please sign in to comment.