@@ -25,7 +25,7 @@ public MindeeClientTest()
2525 [ Fact ]
2626 public async Task Parse_File_Standard_MultiplePages_MustSucceed ( )
2727 {
28- var inputSource = new LocalInputSource ( "Resources/ file_types/pdf/multipage_cut-2.pdf") ;
28+ var inputSource = new LocalInputSource ( Constants . RootDir + " file_types/pdf/multipage_cut-2.pdf") ;
2929 var response = await _mindeeClient . ParseAsync < InvoiceV4 > ( inputSource ) ;
3030 Assert . NotNull ( response ) ;
3131 Assert . Equal ( "success" , response . ApiRequest . Status ) ;
@@ -40,7 +40,7 @@ public async Task Parse_File_Standard_MultiplePages_MustSucceed()
4040 [ Fact ]
4141 public async Task Parse_File_Standard_SinglePage_MustSucceed ( )
4242 {
43- var inputSource = new LocalInputSource ( "Resources/ file_types/receipt.jpg") ;
43+ var inputSource = new LocalInputSource ( Constants . RootDir + " file_types/receipt.jpg") ;
4444 var response = await _mindeeClient . ParseAsync < ReceiptV5 > ( inputSource ) ;
4545 Assert . NotNull ( response ) ;
4646 Assert . Equal ( "success" , response . ApiRequest . Status ) ;
@@ -80,7 +80,7 @@ await Assert.ThrowsAsync<Mindee400Exception>(
8080 [ Fact ]
8181 public async Task Parse_File_Cropper_MustSucceed ( )
8282 {
83- var inputSource = new LocalInputSource ( "Resources/ file_types/receipt.jpg") ;
83+ var inputSource = new LocalInputSource ( Constants . RootDir + " file_types/receipt.jpg") ;
8484 var predictOptions = new PredictOptions ( cropper : true ) ;
8585 var response = await _mindeeClient . ParseAsync < ReceiptV5 > ( inputSource , predictOptions ) ;
8686 Assert . NotNull ( response ) ;
@@ -97,7 +97,7 @@ public async Task Parse_File_Cropper_MustSucceed()
9797 [ Fact ]
9898 public async Task Parse_File_Standard_AllWords_MustSucceed ( )
9999 {
100- var inputSource = new LocalInputSource ( "Resources/ file_types/receipt.jpg") ;
100+ var inputSource = new LocalInputSource ( Constants . RootDir + " file_types/receipt.jpg") ;
101101 var predictOptions = new PredictOptions ( allWords : true ) ;
102102 var response = await _mindeeClient . ParseAsync < InvoiceV4 > ( inputSource , predictOptions ) ;
103103 Assert . NotNull ( response ) ;
@@ -115,7 +115,7 @@ public async Task Parse_File_Standard_AllWords_MustSucceed()
115115 [ Fact ]
116116 public async Task Parse_File_Standard_FullText_MustSucceed ( )
117117 {
118- var inputSource = new LocalInputSource ( "Resources/v1/products/ international_id/default_sample.jpg") ;
118+ var inputSource = new LocalInputSource ( Constants . V1ProductDir + " international_id/default_sample.jpg") ;
119119 var predictOptions = new PredictOptions ( fullText : true ) ;
120120 var response = await _mindeeClient . EnqueueAndParseAsync < InternationalIdV2 > ( inputSource , predictOptions ) ;
121121 Assert . NotNull ( response ) ;
@@ -131,7 +131,7 @@ public async Task Parse_File_Standard_FullText_MustSucceed()
131131 [ Fact ]
132132 public async Task Parse_File_Standard_AllWords_And_Cropper_MustSucceed ( )
133133 {
134- var inputSource = new LocalInputSource ( "Resources/ file_types/receipt.jpg") ;
134+ var inputSource = new LocalInputSource ( Constants . RootDir + " file_types/receipt.jpg") ;
135135 var predictOptions = new PredictOptions ( allWords : true , cropper : true ) ;
136136 var response = await _mindeeClient . ParseAsync < InvoiceV4 > (
137137 inputSource , predictOptions ) ;
@@ -151,15 +151,15 @@ public async Task Parse_File_Standard_AllWords_And_Cropper_MustSucceed()
151151 [ Fact ]
152152 public async Task Enqueue_File_Standard_SyncOnly_Async_MustFail ( )
153153 {
154- var inputSource = new LocalInputSource ( "Resources/v1/products/ passport/default_sample.jpg") ;
154+ var inputSource = new LocalInputSource ( Constants . V1ProductDir + " passport/default_sample.jpg") ;
155155 await Assert . ThrowsAsync < Mindee403Exception > (
156156 ( ) => _mindeeClient . EnqueueAsync < CropperV1 > ( inputSource ) ) ;
157157 }
158158
159159 [ Fact ]
160160 public async Task Enqueue_File_Standard_AsyncOnly_Async_MustSucceed ( )
161161 {
162- var inputSource = new LocalInputSource ( "Resources/v1/products/ invoice_splitter/default_sample.pdf") ;
162+ var inputSource = new LocalInputSource ( Constants . V1ProductDir + " invoice_splitter/default_sample.pdf") ;
163163 var response = await _mindeeClient . EnqueueAsync < InvoiceSplitterV1 > ( inputSource ) ;
164164
165165 Assert . NotNull ( response ) ;
@@ -178,15 +178,15 @@ public async Task Enqueue_File_Standard_AsyncOnly_Async_MustSucceed()
178178 [ Fact ]
179179 public async Task Enqueue_File_Standard_AsyncOnly_Sync_MustFail ( )
180180 {
181- var inputSource = new LocalInputSource ( "Resources/v1/products/ invoice_splitter/default_sample.pdf") ;
181+ var inputSource = new LocalInputSource ( Constants . V1ProductDir + " invoice_splitter/default_sample.pdf") ;
182182 await Assert . ThrowsAsync < Mindee403Exception > (
183183 ( ) => _mindeeClient . ParseAsync < InvoiceSplitterV1 > ( inputSource ) ) ;
184184 }
185185
186186 [ Fact ]
187187 public async Task EnqueueAndParse_File_Standard_AsyncOnly_Async_MustSucceed ( )
188188 {
189- var inputSource = new LocalInputSource ( "Resources/v1/products/ invoice_splitter/default_sample.pdf") ;
189+ var inputSource = new LocalInputSource ( Constants . V1ProductDir + " invoice_splitter/default_sample.pdf") ;
190190 var pollingOptions = new AsyncPollingOptions ( ) ;
191191 var response = await _mindeeClient . EnqueueAndParseAsync < InvoiceSplitterV1 > (
192192 inputSource , pollingOptions : pollingOptions ) ;
@@ -271,7 +271,7 @@ await Assert.ThrowsAsync<Mindee404Exception>(
271271 public async Task Enqueue_File_Generated_AsyncOnly_Sync_MustFail ( )
272272 {
273273 var endpoint = new CustomEndpoint ( "international_id" , "mindee" , "2" ) ;
274- var inputSource = new LocalInputSource ( "Resources/v1/products/ international_id/default_sample.jpg") ;
274+ var inputSource = new LocalInputSource ( Constants . V1ProductDir + " international_id/default_sample.jpg") ;
275275 await Assert . ThrowsAsync < Mindee403Exception > (
276276 ( ) => _mindeeClient . ParseAsync < GeneratedV1 > ( inputSource , endpoint ) ) ;
277277 }
@@ -280,7 +280,7 @@ await Assert.ThrowsAsync<Mindee403Exception>(
280280 public async Task EnqueueAndParse_File_Generated_AsyncOnly_Async_MustSucceed ( )
281281 {
282282 var endpoint = new CustomEndpoint ( "international_id" , "mindee" , "2" ) ;
283- var inputSource = new LocalInputSource ( "Resources/v1/products/ international_id/default_sample.jpg") ;
283+ var inputSource = new LocalInputSource ( Constants . V1ProductDir + " international_id/default_sample.jpg") ;
284284 var response = await _mindeeClient . EnqueueAndParseAsync < GeneratedV1 > ( inputSource , endpoint ) ;
285285
286286 Assert . NotNull ( response ) ;
0 commit comments