Skip to content

Commit

Permalink
Merge pull request #26 from mairess/add-tests
Browse files Browse the repository at this point in the history
Add exception tests
  • Loading branch information
mairess authored Jul 14, 2024
2 parents 44788dd + ed96092 commit 60de939
Show file tree
Hide file tree
Showing 11 changed files with 625 additions and 32 deletions.
39 changes: 19 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# <p align="center">W-net Internet </p>

<div align="center">
# W-net Internet

<a href="https://codecov.io/gh/mairess/w-net-internet" >
<img src="https://codecov.io/gh/mairess/w-net-internet/graph/badge.svg?token=ukuYKkowJP"/>
</a>

</div>

## Context

This is an internet provider management system.
Expand Down Expand Up @@ -44,7 +40,7 @@ MAIL_PASSWORD=your-app-password

### Steps:

1. Clone the repository:
1. Clone repository:

```BASH
git clone git@github.com:mairess/w-net-internet.git
Expand All @@ -61,32 +57,34 @@ mvn install -DskipTests
3. Start ZooKeeper:

```BASH
# Start ZooKeeper:

bin/zookeeper-server-start.sh config/zookeeper.properties
```

4. Start Kafka:

```BASH
# Start Kafka:

bin/kafka-server-start.sh config/server.properties
```

5. Start the database:
5. Start database:

```BASH
docker compose up database -d --build
```

6. Run the API:
6. Run API:

```BASH
mvn spring-boot:run
```

7. Access the API documentation and available routes on your web browser at:
7. Run tests:

```BASH
mvn test
```

8. Access API documentation and available routes on your web browser at:

```BASH
http://localhost:8080/swagger-ui/index.html
Expand Down Expand Up @@ -114,27 +112,28 @@ MAIL_PASSWORD=your-app-password

### Steps:

1. Clone the repository:
1. Clone repository:

```BASH
git clone git@github.com:mairess/w-net-internet.git

cd w-net-internet
```

2. Start application:
2. Run API:

```BASH
docker compose up -d --build
```

3. Access the API documentation and available routes on your web browser at:
3. Run tests:

```BASH
http://localhost:8080/swagger-ui/index.html
mvn test
```

# To do
4. Access API documentation and available routes on your web browser at:

- [ ] Tests
- [x] authentication/authorization
```BASH
http://localhost:8080/swagger-ui/index.html
```
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<haltOnFailure>true</haltOnFailure>
<includes>
<include>**/controller/*</include>
<include>**/service/*</include>
</includes>
<rules>
<rule>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class AddressNotFoundException extends NotFoundException {
* Instantiates a new Address not found exception.
*/
public AddressNotFoundException(String identifier) {
super("Address found with " + identifier + "!");
super("Address not found with identifier " + identifier + "!");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class CustomerNotFoundException extends NotFoundException {
* Instantiates a new Customer not found exception.
*/
public CustomerNotFoundException(String identifier) {
super("Customer not found with " + identifier + "!");
super("Customer not found with identifier " + identifier + "!");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ public class TechnicianCannotBeExcludedException extends CannotBeExcludedExcepti
* Instantiates a new Technician cannot be excluded exception.
*/
public TechnicianCannotBeExcludedException() {
super("This technician cannot be excluded because he has an association!");
super("This Technician cannot be excluded because he has an association!");
}
}
Loading

0 comments on commit 60de939

Please sign in to comment.