-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* src/main/java/com/savvato/tribeapp/controllers/AttributesAPIController.java -modify signature to accept to service src/main/java/com/savvato/tribeapp/repositories/ToBeReviewedRepository.java -add a method to search for phrases by ID src/main/java/com/savvato/tribeapp/services/AttributesService.java -modified the interface signature src/main/java/com/savvato/tribeapp/services/AttributesServiceImpl.java -modified getAttrbrutes to call getTobereviewed to get pending attributes -wrote function to get pending attributes src/main/resources/db/migration/changelog-202410240839.xml -added test data to test new function src/main/resources/db/migration/changelog-master.xml -added new changelog to implemented test data src/test/java/com/savvato/tribeapp/integration/controllers/AttributesAPIIT.java -commented out broken tests src/test/java/com/savvato/tribeapp/unit/services/AttributesServiceImplTest.java -commented out broken tests * src/main/java/com/savvato/tribeapp/services/AttributesService.java -modified the return for getAttributes to return a map of empty instead of a collection of empty modified: src/main/java/com/savvato/tribeapp/services/AttributesServiceImpl.java -added getPhrasesToBeReviewedByUserId to the implementation modified: src/test/java/com/savvato/tribeapp/integration/controllers/AttributesAPIIT.java -fixed test for the controller modified: src/test/java/com/savvato/tribeapp/unit/services/AttributesServiceImplTest.java -fixed test for get attributes
- Loading branch information
1 parent
1e9754b
commit 67cc37e
Showing
8 changed files
with
248 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
src/main/resources/db/migration/changelog-202410240839.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<databaseChangeLog | ||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog | ||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd"> | ||
|
||
<changeSet id="202410240839" author="Loretdemolas" context="test"> | ||
<comment>Insert test data for user 2 into to_be_reviewed and review_decision tables</comment> | ||
|
||
<!-- Insert test data into to_be_reviewed table --> | ||
<insert tableName="to_be_reviewed"> | ||
<column name="id" valueNumeric="1" /> | ||
<column name="has_been_groomed" valueNumeric="0" /> | ||
<column name="adverb" value="quickly" /> | ||
<column name="verb" value="jumps" /> | ||
<column name="noun" value="frog" /> | ||
<column name="preposition" value="over" /> | ||
</insert> | ||
|
||
<insert tableName="to_be_reviewed"> | ||
<column name="id" valueNumeric="2" /> | ||
<column name="has_been_groomed" valueNumeric="1" /> | ||
<column name="adverb" value="silently" /> | ||
<column name="verb" value="sneaks" /> | ||
<column name="noun" value="cat" /> | ||
<column name="preposition" value="under" /> | ||
</insert> | ||
|
||
<insert tableName="to_be_reviewed"> | ||
<column name="id" valueNumeric="3" /> | ||
<column name="has_been_groomed" valueNumeric="0" /> | ||
<column name="adverb" value="lazily" /> | ||
<column name="verb" value="sleeps" /> | ||
<column name="noun" value="dog" /> | ||
<column name="preposition" value="on" /> | ||
</insert> | ||
|
||
<!-- Insert test data into review_submitting_user table --> | ||
<insert tableName="review_submitting_user"> | ||
<column name="user_id" valueNumeric="2" /> | ||
<column name="to_be_reviewed_id" valueNumeric="1" /> | ||
</insert> | ||
|
||
<insert tableName="review_submitting_user"> | ||
<column name="user_id" valueNumeric="2" /> | ||
<column name="to_be_reviewed_id" valueNumeric="2" /> | ||
</insert> | ||
|
||
<insert tableName="review_submitting_user"> | ||
<column name="user_id" valueNumeric="2" /> | ||
<column name="to_be_reviewed_id" valueNumeric="3" /> | ||
</insert> | ||
|
||
</changeSet> | ||
|
||
</databaseChangeLog> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.