Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,42 @@ void getVersionInitiated() {
}
}

/**
* Tests the method {@link AliasQuery#getAmountEntriesAlias()} ()}
* @throws JSONException
* @throws IOException
*/
@Test
void getAmountEntriesAliastest() throws JSONException, IOException {
void getAmountEntriesAliasTest() throws JSONException, IOException {
String testname = "getAmountEntriesAlias";
aliasRepository.save(new Alias("alias1", 1, "50.34", 0));
aliasRepository.save(new Alias("alias2", 2, "50.35", 0));
UtilTests.validate(graphQLTestTemplate, testname, UtilTests.ADMIN);
}

/**
* Tests the method {@link AliasQuery#getAllAliases()}
* @throws JSONException
* @throws IOException
*/
@Test
void getAllAliasesTest() throws JSONException, IOException {
String testname = "getAllAliases";
aliasRepository.save(new Alias("alias1", 1, "50.34", 0));
aliasRepository.save(new Alias("alias2", 2, "50.35", 0));
UtilTests.validate(graphQLTestTemplate, testname, UtilTests.ADMIN);
}

/**
* Tests the method {@link AliasQuery#getAliasByName(String)}
* @throws JSONException
* @throws IOException
*/
@Test
void getAliasByNameTest() throws JSONException, IOException {
String testname = "getAliasByName";
aliasRepository.save(new Alias("alias1", 1, "50.34", 0));
aliasRepository.save(new Alias("alias2", 2, "50.35", 0));
UtilTests.validate(graphQLTestTemplate, testname, UtilTests.ADMIN);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
getAliasByName(name: "alias1") {
name
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
getAllAliases {
name
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"data": {
"getAliasByName": [
{
"name": "alias1"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"data": {
"getAllAliases": [
{
"name": "alias1"
},
{
"name": "alias2"
}
]
}
}