@@ -66,4 +66,83 @@ public async Task GetSubmodelElement_CustomSubmodel_OperatingConditionsOfReliabi
6666
6767 await CompareJsonAsync ( json , Path . Combine ( Directory . GetCurrentDirectory ( ) , "SubmodelRepository" , "TestData" , "GetSubmodelElement_CustomSubmodel_OperatingConditionsOfReliabilityCharacteristics.json" ) ) ;
6868 }
69+
70+ [ Fact ]
71+ public async Task GetAllSubmodelElements_ContactInfo_WithLimit100_LevelDeep_ExtentWithBlobValue_ShouldReturnSuccess_WithPagedResultShape ( )
72+ {
73+ // Arrange
74+ var url = $ "/submodels/{ SubmodelIdentifierContact } /submodel-elements?limit=100&level=deep&extent=withBlobValue";
75+
76+ // Act
77+ var response = await ApiContext . GetAsync ( url ) ;
78+
79+ // Assert
80+ AssertSuccessResponse ( response ) ;
81+ var content = await response . TextAsync ( ) ;
82+ Assert . False ( string . IsNullOrEmpty ( content ) ) ;
83+
84+ var json = JsonDocument . Parse ( content ) ;
85+ Assert . NotNull ( json ) ;
86+
87+ await CompareJsonAsync ( json , Path . Combine ( Directory . GetCurrentDirectory ( ) , "SubmodelRepository" , "TestData" , "GetAllSubmodelElements_ContactInfo_WithLimit100_LevelDeep_ExtentWithBlobValue_Expected.json" ) ) ;
88+ }
89+
90+ [ Fact ]
91+ public async Task GetAllSubmodelElements_ContactInfo_WithLimit1_ShouldReturnAtMostOneResult ( )
92+ {
93+ // Arrange
94+ var url = $ "/submodels/{ SubmodelIdentifierContact } /submodel-elements?limit=1";
95+
96+ // Act
97+ var response = await ApiContext . GetAsync ( url ) ;
98+
99+ // Assert
100+ AssertSuccessResponse ( response ) ;
101+ var content = await response . TextAsync ( ) ;
102+ Assert . False ( string . IsNullOrEmpty ( content ) ) ;
103+
104+ var json = JsonDocument . Parse ( content ) ;
105+ Assert . NotNull ( json ) ;
106+ await CompareJsonAsync ( json , Path . Combine ( Directory . GetCurrentDirectory ( ) , "SubmodelRepository" , "TestData" , "GetAllSubmodelElements_ContactInfo_With_Limit1_Expected.json" ) ) ;
107+ }
108+
109+ [ Fact ]
110+ public async Task GetAllSubmodelElements_ContactInfo_WithLimit1AndCursor_ShouldReturnAtMostOneResult ( )
111+ {
112+ // Arrange
113+ var cursor = "Q29udGFjdEluZm9ybWF0aW9uMA" ;
114+ var url = $ "/submodels/{ SubmodelIdentifierContact } /submodel-elements?limit=1&cursor={ cursor } ";
115+
116+ // Act
117+ var response = await ApiContext . GetAsync ( url ) ;
118+
119+ // Assert
120+ AssertSuccessResponse ( response ) ;
121+ var content = await response . TextAsync ( ) ;
122+ Assert . False ( string . IsNullOrEmpty ( content ) ) ;
123+
124+ var json = JsonDocument . Parse ( content ) ;
125+ Assert . NotNull ( json ) ;
126+ await CompareJsonAsync ( json , Path . Combine ( Directory . GetCurrentDirectory ( ) , "SubmodelRepository" , "TestData" , "GetAllSubmodelElements_ContactInfo_With_Limit1_And_Cursor_Expected.json" ) ) ;
127+ }
128+
129+ [ Fact ]
130+ public async Task GetAllSubmodelElements_ContactInfo_WithCursor_ShouldReturnSuccess_WithPagedResultShape ( )
131+ {
132+ // Arrange
133+ var cursor = "Q29udGFjdEluZm9ybWF0aW9uMA" ;
134+ var url = $ "/submodels/{ SubmodelIdentifierContact } /submodel-elements?cursor={ cursor } ";
135+
136+ // Act
137+ var response = await ApiContext . GetAsync ( url ) ;
138+
139+ // Assert
140+ AssertSuccessResponse ( response ) ;
141+ var content = await response . TextAsync ( ) ;
142+ Assert . False ( string . IsNullOrEmpty ( content ) ) ;
143+
144+ var json = JsonDocument . Parse ( content ) ;
145+ Assert . NotNull ( json ) ;
146+ await CompareJsonAsync ( json , Path . Combine ( Directory . GetCurrentDirectory ( ) , "SubmodelRepository" , "TestData" , "GetAllSubmodelElements_ContactInfo_With_Cursor_Expected.json" ) ) ;
147+ }
69148}
0 commit comments