Skip to content

Commit 5da516f

Browse files
committed
fix local tests
1 parent e3283fa commit 5da516f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

srv/src/test/java/my/bookshop/GenreHierarchyTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ void testStartOneLevel() throws Exception {
5252
+ "com.sap.vocabularies.Hierarchy.v1.TopLevels(HierarchyNodes=$root/GenreHierarchy,HierarchyQualifier='GenreHierarchy',NodeProperty='ID',Levels=1)"
5353
+ "&$count=true"))
5454
.andExpect(status().isOk())
55-
.andExpect(jsonPath("$.value[0].ID").value("f846b0b9-01d4-4f6d-82a4-d79204f62369"))
55+
.andExpect(jsonPath("$.value[0].ID").value("8bbf14c6-b378-4e35-9b4f-5a9c8b8762da"))
5656
.andExpect(jsonPath("$.value[0].name").value("Fiction"))
5757
.andExpect(jsonPath("$.value[0].DistanceFromRoot").value(0))
5858
.andExpect(jsonPath("$.value[0].DrillState").value("collapsed"))
59-
.andExpect(jsonPath("$.value[1].ID").value("d846b0b9-01d4-4f6d-82a4-d79204f62487"))
59+
.andExpect(jsonPath("$.value[1].ID").value("85b5a640-7e9a-468e-80e2-e9268486031b"))
6060
.andExpect(jsonPath("$.value[1].name").value("Non-Fiction"))
6161
.andExpect(jsonPath("$.value[1].DistanceFromRoot").value(0))
6262
.andExpect(jsonPath("$.value[1].DrillState").value("collapsed"))
@@ -89,7 +89,7 @@ void testStartTwoLevels() throws Exception {
8989
void testExpandNonFiction() throws Exception {
9090
client.perform(get(genresURI
9191
+ "?$select=DrillState,ID,name"
92-
+ "&$apply=descendants($root/GenreHierarchy,GenreHierarchy,ID,filter(ID eq d846b0b9-01d4-4f6d-82a4-d79204f62487),1)"
92+
+ "&$apply=descendants($root/GenreHierarchy,GenreHierarchy,ID,filter(ID eq 85b5a640-7e9a-468e-80e2-e9268486031b),1)"
9393
+ "/orderby(ID)"))
9494
.andExpect(status().isOk())
9595
.andExpect(jsonPath("$.value[0].name").value("Biography"))
@@ -193,7 +193,7 @@ void testFilterNotExpanded() throws Exception {
193193
@WithMockUser(username = "admin")
194194
void testFilterExpandLevels() throws Exception {
195195
String expandLevelsJson = """
196-
[{"NodeID":"f846b0b9-01d4-4f6d-82a4-d79204f62369","Levels":1},{"NodeID":"d846b0b9-01d4-4f6d-82a4-d79204f62487","Levels":1}]\
196+
[{"NodeID":"8bbf14c6-b378-4e35-9b4f-5a9c8b8762da","Levels":1},{"NodeID":"85b5a640-7e9a-468e-80e2-e9268486031b","Levels":1}]\
197197
""";
198198
String unencoded = genresURI + "?$select=DistanceFromRoot,DrillState,ID,LimitedDescendantCount,name"
199199
+ "&$apply=ancestors($root/GenreHierarchy,GenreHierarchy,ID,filter(name eq 'Autobiography'),keep start)/orderby(name)"
@@ -219,10 +219,10 @@ void testStartTwoLevelsOrderByDescHANA() throws Exception {
219219
+ "com.sap.vocabularies.Hierarchy.v1.TopLevels(HierarchyNodes=$root/GenreHierarchy,HierarchyQualifier='GenreHierarchy',NodeProperty='ID',Levels=2)"
220220
+ "&$count=true"))
221221
.andExpect(status().isOk())
222-
.andExpect(jsonPath("$.value[0].ID").value(200))
223-
.andExpect(jsonPath("$.value[1].ID").value(204))
224-
.andExpect(jsonPath("$.value[20].ID").value(101))
225-
.andExpect(jsonPath("$.value[21]").doesNotExist());
222+
.andExpect(jsonPath("$.value[0].name").value("Non-Fiction"))
223+
.andExpect(jsonPath("$.value[1].name").value("Speech"))
224+
.andExpect(jsonPath("$.value[21].name").value("Action"))
225+
.andExpect(jsonPath("$.value[22]").doesNotExist());
226226
}
227227
}
228228

0 commit comments

Comments
 (0)