@@ -12,7 +12,7 @@ public class InferenceTest
1212 [ Fact ]
1313 public void FinancialDocument_WhenEmpty_MustHaveValidProperties ( )
1414 {
15- var response = GetInference ( "products/financial_document/blank.json" ) ;
15+ var response = GetInference ( "products/extraction/ financial_document/blank.json" ) ;
1616 AssertInferenceResponse ( response ) ;
1717
1818 var fields = response . Inference . Result . Fields ;
@@ -51,7 +51,7 @@ public void FinancialDocument_WhenEmpty_MustHaveValidProperties()
5151 [ Fact ]
5252 public void FinancialDocument_WhenComplete_MustHaveValidProperties ( )
5353 {
54- var response = GetInference ( "products/financial_document/complete.json" ) ;
54+ var response = GetInference ( "products/extraction/ financial_document/complete.json" ) ;
5555 AssertInferenceResponse ( response ) ;
5656
5757 var activeOptions = response . Inference . ActiveOptions ;
@@ -87,7 +87,7 @@ public void FinancialDocument_WhenComplete_MustHaveValidProperties()
8787 [ Fact ( DisplayName = "deep_nested_fields.json – all nested structures must be typed correctly" ) ]
8888 public void DeepNestedFields_mustExposeCorrectTypes ( )
8989 {
90- var response = GetInference ( "inference /deep_nested_fields.json" ) ;
90+ var response = GetInference ( "products/extraction /deep_nested_fields.json" ) ;
9191 AssertInferenceResponse ( response ) ;
9292
9393 var inference = response . Inference ;
@@ -97,6 +97,12 @@ public void DeepNestedFields_mustExposeCorrectTypes()
9797 Assert . NotNull ( fields [ "field_object" ] . ObjectField ) ;
9898
9999 var fieldObject = fields [ "field_object" ] . ObjectField ! ;
100+ Assert . Single ( fieldObject . SimpleFields ) ;
101+ Assert . Single ( fieldObject . ListFields ) ;
102+ Assert . Single ( fieldObject . ObjectFields ) ;
103+ Assert . Equal ( "value_2" , fieldObject . GetSimpleField ( "sub_object_simple" ) . Value ) ;
104+ Assert . Equal ( 2 , fieldObject . GetListField ( "sub_object_list" ) . Items . Count ) ;
105+ Assert . NotEmpty ( fieldObject . GetObjectField ( "sub_object_object" ) . Fields ) ;
100106 var lvl1 = fieldObject . Fields ;
101107 Assert . NotNull ( lvl1 [ "sub_object_list" ] . ListField ) ;
102108 Assert . NotNull ( lvl1 [ "sub_object_object" ] . ObjectField ) ;
@@ -118,7 +124,7 @@ public void DeepNestedFields_mustExposeCorrectTypes()
118124 [ Fact ( DisplayName = "standard_field_types.json – file metadata must be recognised" ) ]
119125 public void StandardFieldTypes_mustExposeFileValues ( )
120126 {
121- var response = GetInference ( "inference /standard_field_types.json" ) ;
127+ var response = GetInference ( "products/extraction /standard_field_types.json" ) ;
122128 AssertInferenceResponse ( response ) ;
123129
124130 var inference = response . Inference ;
@@ -140,7 +146,7 @@ public void StandardFieldTypes_mustExposeFileValues()
140146 [ Fact ( DisplayName = "standard_field_types.json – simple fields must be recognised" ) ]
141147 public void StandardFieldTypes_mustExposeSimpleFieldValues ( )
142148 {
143- var response = GetInference ( "inference /standard_field_types.json" ) ;
149+ var response = GetInference ( "products/extraction /standard_field_types.json" ) ;
144150 AssertInferenceResponse ( response ) ;
145151
146152 var inference = response . Inference ;
@@ -181,7 +187,7 @@ public void StandardFieldTypes_mustExposeSimpleFieldValues()
181187 [ Fact ( DisplayName = "standard_field_types.json – simple list fields must be recognised" ) ]
182188 public void StandardFieldTypes_mustExposeSimpleListFieldValues ( )
183189 {
184- var response = GetInference ( "inference /standard_field_types.json" ) ;
190+ var response = GetInference ( "products/extraction /standard_field_types.json" ) ;
185191 AssertInferenceResponse ( response ) ;
186192
187193 var inference = response . Inference ;
@@ -203,7 +209,7 @@ public void StandardFieldTypes_mustExposeSimpleListFieldValues()
203209 [ Fact ( DisplayName = "standard_field_types.json – object fields must be recognised" ) ]
204210 public void StandardFieldTypes_mustExposeObjectFieldValues ( )
205211 {
206- var response = GetInference ( "inference /standard_field_types.json" ) ;
212+ var response = GetInference ( "products/extraction /standard_field_types.json" ) ;
207213 AssertInferenceResponse ( response ) ;
208214
209215 var inference = response . Inference ;
@@ -228,7 +234,7 @@ public void StandardFieldTypes_mustExposeObjectFieldValues()
228234 [ Fact ( DisplayName = "standard_field_types.json – simple list fields must be recognised" ) ]
229235 public void StandardFieldTypes_mustExposeObjectListFieldValues ( )
230236 {
231- var response = GetInference ( "inference /standard_field_types.json" ) ;
237+ var response = GetInference ( "products/extraction /standard_field_types.json" ) ;
232238 AssertInferenceResponse ( response ) ;
233239
234240 var inference = response . Inference ;
@@ -262,7 +268,7 @@ public void StandardFieldTypes_mustExposeObjectListFieldValues()
262268 [ Fact ( DisplayName = "standard_field_types.json - locations must be recognised" ) ]
263269 public void StandardFieldTypes_mustHaveLocations ( )
264270 {
265- var response = GetInference ( "inference /standard_field_types.json" ) ;
271+ var response = GetInference ( "products/extraction /standard_field_types.json" ) ;
266272 AssertInferenceResponse ( response ) ;
267273
268274 var inference = response . Inference ;
@@ -285,9 +291,9 @@ public void StandardFieldTypes_mustHaveLocations()
285291 public void RstDisplay_mustBeAccessible ( )
286292 {
287293 // Arrange
288- var resp = GetInference ( "inference /standard_field_types.json" ) ;
294+ var resp = GetInference ( "products/extraction /standard_field_types.json" ) ;
289295 var rstReference = File . ReadAllText (
290- Constants . V2RootDir + "inference /standard_field_types.rst" ) ;
296+ Constants . V2RootDir + "products/extraction /standard_field_types.rst" ) ;
291297
292298 var inf = resp . Inference ;
293299
@@ -302,7 +308,7 @@ public void RstDisplay_mustBeAccessible()
302308 [ Fact ]
303309 public void RawText_whenActivated_mustExposeProperties ( )
304310 {
305- var response = GetInference ( "inference /raw_texts.json" ) ;
311+ var response = GetInference ( "products/extraction /raw_texts.json" ) ;
306312 AssertInferenceResponse ( response ) ;
307313
308314 var activeOptions = response . Inference . ActiveOptions ;
@@ -324,14 +330,14 @@ public void RawText_whenActivated_mustExposeProperties()
324330
325331 Assert . Equal ( "This is the raw text of the first page..." , rawText . Pages [ 0 ] . Content ) ;
326332 Assert . Equal (
327- File . ReadAllText ( Constants . V2RootDir + "inference /raw_texts.txt" ) ,
333+ File . ReadAllText ( Constants . V2RootDir + "products/extraction /raw_texts.txt" ) ,
328334 rawText . ToString ( ) ) ;
329335 }
330336
331337 [ Fact ]
332338 public void Rag_whenMatched_mustExposeProperties ( )
333339 {
334- var response = GetInference ( "inference /rag_matched.json" ) ;
340+ var response = GetInference ( "products/extraction /rag_matched.json" ) ;
335341 AssertInferenceResponse ( response ) ;
336342
337343 var activeOptions = response . Inference . ActiveOptions ;
@@ -349,7 +355,7 @@ public void Rag_whenMatched_mustExposeProperties()
349355 [ Fact ]
350356 public void Rag_whenNotMatched_mustExposeProperties ( )
351357 {
352- var response = GetInference ( "inference /rag_not_matched.json" ) ;
358+ var response = GetInference ( "products/extraction /rag_not_matched.json" ) ;
353359 AssertInferenceResponse ( response ) ;
354360
355361 var activeOptions = response . Inference . ActiveOptions ;
0 commit comments