issues
search
KorynLA
/
GuineaPigFactsBackend
Daily guinea pig facts
0
stars
0
forks
source link
Add testing
#1
Closed
KorynLA
closed
4 years ago
KorynLA
commented
4 years ago
Testing Spec
Service Layer
User
[x] Update User
Returns: User
[x] Delete
Returns: void
[x] Save Or Update
Returns: void
[x] Find All
Returns: List
[x] Find By ID / Find current User
Returns: Optional
[x] Find By Username
Returns: User
[x] Find By Contact Email
Returns: User
Fact
[x] Delete
Returns: void
[x] Save Or Update
Returns: void
[x] Find All
Returns: List
[x] Find By Fact ID
Returns: Optional
Controller Layer
User "/user"
[x] PUT "/{id}"
Bad id given: Throws IdNotFound Exception
Returns: HTTPSTATUS.OK
[x] DELETE "/{id}"
Bad id given: Throws IdNotFound Exception
Returns: HTTPSTATUS.OK
[x] GET "/{id}"
Bad id given: Throws IdNotFound Exception
Returns: HTTPSTATUS.OK
[x] POST"/"
Returns: HTTPSTATUS.CREATED
UserName already in system: Throws UserFound Exception
Email already in system: Throws UserFound Exception
Fact "/fact"
[x] GET "", "/", "/home"
Returns: HTTPSTATUS.OK
[x] POST "/"
Returns: HTTPSTATUS.CREATED
[x] DELETE "/{id}"
Bad id given: Throws IdNotFound Exception
Returns: HTTPSTATUS.OK
[x] GET "/{id}"
Bad id given: Throws IdNotFound Exception
Returns: HTTPSTATUS.OK
KorynLA
commented
4 years ago
Unit tests are in PR #8
KorynLA
commented
4 years ago
Test branch merged. Issue closed.
Testing Spec
Service Layer
User
Fact
Controller Layer
User "/user"
Fact "/fact"