Skip to content

Commit

Permalink
Merge pull request #40 from SuK-IT/develop
Browse files Browse the repository at this point in the history
fix: Fix dictionary reading and tests
  • Loading branch information
Griefed authored Sep 10, 2021
2 parents e0f882e + a5c35d4 commit 3c47e04
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 13 deletions.
4 changes: 2 additions & 2 deletions backend/main/resources/dictionary.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"keywords": [
{
"keyword": "hallo",
"response": "Hallo, ich bin der Sprach-und Kommunkationsbot. Wie kann ich helfen?",
"response": "Hallo, ich bin der Sprach-und Kommunikationsbot. Wie kann ich helfen?",
"priority": 1
},
{
"keyword": "hi",
"response": "Hallo, ich bin der Sprach-und Kommunkationsbot. Wie kann ich helfen?",
"response": "Hallo, ich bin der Sprach-und Kommunikationsbot. Wie kann ich helfen?",
"priority": 1
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void responseGetCompareStringTest() {
Assertions.assertEquals("8 - Hallo Welt!", RESPONSEHANDLER.getReponse("wort7"));
Assertions.assertEquals("9 - Hallo Welt!", RESPONSEHANDLER.getReponse("wort8"));
Assertions.assertEquals("10 - Hallo Welt!", RESPONSEHANDLER.getReponse("wort9"));
Assertions.assertEquals("No match found!", RESPONSEHANDLER.getReponse("890uta4m3cgva3zn849"));
Assertions.assertEquals("none", RESPONSEHANDLER.getReponse("890uta4m3cgva3zn849"));
}

}
31 changes: 21 additions & 10 deletions backend/test/resources/dictionary.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,55 @@
{
"nomatch": "none",
"keywords": [
{
"keyword": "wort0",
"response": "1 - Hallo Welt!"
"response": "1 - Hallo Welt!",
"priority": 1
},
{
"keyword": "wort1",
"response": "2 - Hallo Welt!"
"response": "2 - Hallo Welt!",
"priority": 2
},
{
"keyword": "wort2",
"response": "3 - Hallo Welt!"
"response": "3 - Hallo Welt!",
"priority": 3
},
{
"keyword": "wort3",
"response": "4 - Hallo Welt!"
"response": "4 - Hallo Welt!",
"priority": 1
},
{
"keyword": "wort4",
"response": "5 - Hallo Welt!"
"response": "5 - Hallo Welt!",
"priority": 2
},
{
"keyword": "wort5",
"response": "6 - Hallo Welt!"
"response": "6 - Hallo Welt!",
"priority": 3
},
{
"keyword": "wort6",
"response": "7 - Hallo Welt!"
"response": "7 - Hallo Welt!",
"priority": 1
},
{
"keyword": "wort7",
"response": "8 - Hallo Welt!"
"response": "8 - Hallo Welt!",
"priority": 2
},
{
"keyword": "wort8",
"response": "9 - Hallo Welt!"
"response": "9 - Hallo Welt!",
"priority": 3
},
{
"keyword": "wort9",
"response": "10 - Hallo Welt!"
"response": "10 - Hallo Welt!",
"priority": 1
}
]
}

0 comments on commit 3c47e04

Please sign in to comment.