@@ -7,7 +7,7 @@ namespace Mindee.UnitTests.V2.Parsing
77{
88 [ Trait ( "Category" , "V2" ) ]
99 [ Trait ( "Category" , "Inference" ) ]
10- public class InferenceV2Test
10+ public class InferenceTest
1111 {
1212 [ Fact ]
1313 public void AsyncPredict_WhenEmpty_MustHaveValidProperties ( )
@@ -49,7 +49,7 @@ public void AsyncPredict_WhenEmpty_MustHaveValidProperties()
4949 [ Fact ]
5050 public void AsyncPredict_WhenComplete_MustHaveValidProperties ( )
5151 {
52- var response = GetInference ( "Resources/v2/products/financial_document/complete.json" ) ;
52+ InferenceResponse response = GetInference ( "Resources/v2/products/financial_document/complete.json" ) ;
5353 InferenceActiveOptions activeOptions = response . Inference . ActiveOptions ;
5454 Assert . NotNull ( activeOptions ) ;
5555 Assert . False ( activeOptions . Rag ) ;
@@ -83,8 +83,8 @@ public void AsyncPredict_WhenComplete_MustHaveValidProperties()
8383 [ Fact ( DisplayName = "deep_nested_fields.json – all nested structures must be typed correctly" ) ]
8484 public void DeepNestedFields_mustExposeCorrectTypes ( )
8585 {
86- var resp = GetInference ( "Resources/v2/inference/deep_nested_fields.json" ) ;
87- Inference ? inf = resp . Inference ;
86+ InferenceResponse response = GetInference ( "Resources/v2/inference/deep_nested_fields.json" ) ;
87+ Inference ? inf = response . Inference ;
8888 Assert . NotNull ( inf ) ;
8989
9090 InferenceFields fields = inf . Result . Fields ;
@@ -113,8 +113,8 @@ public void DeepNestedFields_mustExposeCorrectTypes()
113113 [ Fact ( DisplayName = "standard_field_types.json – file metadata must be recognised" ) ]
114114 public void StandardFieldTypes_mustExposeFileValues ( )
115115 {
116- var resp = GetInference ( "Resources/v2/inference/standard_field_types.json" ) ;
117- Inference ? inference = resp . Inference ;
116+ InferenceResponse response = GetInference ( "Resources/v2/inference/standard_field_types.json" ) ;
117+ Inference ? inference = response . Inference ;
118118 Assert . NotNull ( inference ) ;
119119 InferenceFile file = inference . File ;
120120 Assert . NotNull ( file ) ;
@@ -135,8 +135,8 @@ public void StandardFieldTypes_mustExposeFileValues()
135135 [ Fact ( DisplayName = "standard_field_types.json – simple fields must be recognised" ) ]
136136 public void StandardFieldTypes_mustExposeSimpleFieldValues ( )
137137 {
138- var resp = GetInference ( "Resources/v2/inference/standard_field_types.json" ) ;
139- Inference ? inference = resp . Inference ;
138+ InferenceResponse response = GetInference ( "Resources/v2/inference/standard_field_types.json" ) ;
139+ Inference ? inference = response . Inference ;
140140 Assert . NotNull ( inference ) ;
141141 InferenceFields fields = inference . Result . Fields ;
142142
@@ -175,8 +175,8 @@ public void StandardFieldTypes_mustExposeSimpleFieldValues()
175175 [ Fact ( DisplayName = "standard_field_types.json – simple list fields must be recognised" ) ]
176176 public void StandardFieldTypes_mustExposeSimpleListFieldValues ( )
177177 {
178- var resp = GetInference ( "Resources/v2/inference/standard_field_types.json" ) ;
179- Inference ? inference = resp . Inference ;
178+ InferenceResponse response = GetInference ( "Resources/v2/inference/standard_field_types.json" ) ;
179+ Inference ? inference = response . Inference ;
180180 Assert . NotNull ( inference ) ;
181181 InferenceFields fields = inference . Result . Fields ;
182182
@@ -196,8 +196,8 @@ public void StandardFieldTypes_mustExposeSimpleListFieldValues()
196196 [ Fact ( DisplayName = "standard_field_types.json – object fields must be recognised" ) ]
197197 public void StandardFieldTypes_mustExposeObjectFieldValues ( )
198198 {
199- var resp = GetInference ( "Resources/v2/inference/standard_field_types.json" ) ;
200- Inference ? inference = resp . Inference ;
199+ InferenceResponse response = GetInference ( "Resources/v2/inference/standard_field_types.json" ) ;
200+ Inference ? inference = response . Inference ;
201201 Assert . NotNull ( inference ) ;
202202 InferenceFields fields = inference . Result . Fields ;
203203
@@ -220,8 +220,8 @@ public void StandardFieldTypes_mustExposeObjectFieldValues()
220220 [ Fact ( DisplayName = "standard_field_types.json – simple list fields must be recognised" ) ]
221221 public void StandardFieldTypes_mustExposeObjectListFieldValues ( )
222222 {
223- var resp = GetInference ( "Resources/v2/inference/standard_field_types.json" ) ;
224- Inference ? inference = resp . Inference ;
223+ InferenceResponse response = GetInference ( "Resources/v2/inference/standard_field_types.json" ) ;
224+ Inference ? inference = response . Inference ;
225225 Assert . NotNull ( inference ) ;
226226 InferenceFields fields = inference . Result . Fields ;
227227
@@ -254,7 +254,6 @@ public void StandardFieldTypes_mustExposeObjectListFieldValues()
254254 public void AsyncPredict_WhenComplete_MustHaveRawText ( )
255255 {
256256 InferenceResponse response = GetInference ( "Resources/v2/inference/raw_texts.json" ) ;
257-
258257 InferenceActiveOptions activeOptions = response . Inference . ActiveOptions ;
259258 Assert . NotNull ( activeOptions ) ;
260259 Assert . False ( activeOptions . Rag ) ;
@@ -279,8 +278,8 @@ public void AsyncPredict_WhenComplete_MustHaveRawText()
279278 [ Fact ( DisplayName = "standard_field_types.json - locations must be recognised" ) ]
280279 public void StandardFieldTypes_mustHaveLocations ( )
281280 {
282- var resp = GetInference ( "Resources/v2/inference/standard_field_types.json" ) ;
283- Inference ? inf = resp . Inference ;
281+ InferenceResponse response = GetInference ( "Resources/v2/inference/standard_field_types.json" ) ;
282+ Inference ? inf = response . Inference ;
284283 InferenceFields fields = inf . Result . Fields ;
285284 Assert . NotNull ( inf ) ;
286285 SimpleField simpleField = fields [ "field_simple_string" ] . SimpleField ;
@@ -324,7 +323,7 @@ private static string NormalizeLineEndings(string input) =>
324323
325324 private static InferenceResponse GetInference ( string path )
326325 {
327- var localResponse = new LocalResponse ( File . ReadAllText ( path ) ) ;
326+ LocalResponse localResponse = new LocalResponse ( File . ReadAllText ( path ) ) ;
328327 return localResponse . DeserializeResponse < InferenceResponse > ( ) ;
329328 }
330329 }
0 commit comments