@@ -166,8 +166,6 @@ public async Task Cannot_create_resource_with_multiple_violations()
166166 type = "systemDirectories" ,
167167 attributes = new
168168 {
169- isCaseSensitive = false ,
170- sizeInBytes = - 1
171169 }
172170 }
173171 } ;
@@ -192,9 +190,9 @@ public async Task Cannot_create_resource_with_multiple_violations()
192190 ErrorObject error2 = responseDocument . Errors [ 1 ] ;
193191 error2 . StatusCode . Should ( ) . Be ( HttpStatusCode . UnprocessableEntity ) ;
194192 error2 . Title . Should ( ) . Be ( "Input validation failed." ) ;
195- error2 . Detail . Should ( ) . Be ( "The field SizeInBytes must be between 0 and 9223372036854775807 ." ) ;
193+ error2 . Detail . Should ( ) . Be ( "The IsCaseSensitive field is required ." ) ;
196194 error2 . Source . ShouldNotBeNull ( ) ;
197- error2 . Source . Pointer . Should ( ) . Be ( "/data/attributes/sizeInBytes " ) ;
195+ error2 . Source . Pointer . Should ( ) . Be ( "/data/attributes/isCaseSensitive " ) ;
198196 }
199197
200198 [ Fact ]
@@ -205,15 +203,14 @@ public async Task Does_not_exceed_MaxModelValidationErrors()
205203 {
206204 data = new
207205 {
208- type = "systemDirectories " ,
206+ type = "systemFiles " ,
209207 attributes = new
210208 {
211- sizeInBytes = - 1
212209 }
213210 }
214211 } ;
215212
216- const string route = "/systemDirectories " ;
213+ const string route = "/systemFiles " ;
217214
218215 // Act
219216 ( HttpResponseMessage httpResponse , Document responseDocument ) = await _testContext . ExecutePostAsync < Document > ( route , requestBody ) ;
@@ -232,16 +229,16 @@ public async Task Does_not_exceed_MaxModelValidationErrors()
232229 ErrorObject error2 = responseDocument . Errors [ 1 ] ;
233230 error2 . StatusCode . Should ( ) . Be ( HttpStatusCode . UnprocessableEntity ) ;
234231 error2 . Title . Should ( ) . Be ( "Input validation failed." ) ;
235- error2 . Detail . Should ( ) . Be ( "The Name field is required." ) ;
232+ error2 . Detail . Should ( ) . Be ( "The FileName field is required." ) ;
236233 error2 . Source . ShouldNotBeNull ( ) ;
237- error2 . Source . Pointer . Should ( ) . Be ( "/data/attributes/directoryName " ) ;
234+ error2 . Source . Pointer . Should ( ) . Be ( "/data/attributes/fileName " ) ;
238235
239236 ErrorObject error3 = responseDocument . Errors [ 2 ] ;
240237 error3 . StatusCode . Should ( ) . Be ( HttpStatusCode . UnprocessableEntity ) ;
241238 error3 . Title . Should ( ) . Be ( "Input validation failed." ) ;
242- error3 . Detail . Should ( ) . Be ( "The IsCaseSensitive field is required." ) ;
239+ error3 . Detail . Should ( ) . Be ( "The Attributes field is required." ) ;
243240 error3 . Source . ShouldNotBeNull ( ) ;
244- error3 . Source . Pointer . Should ( ) . Be ( "/data/attributes/isCaseSensitive " ) ;
241+ error3 . Source . Pointer . Should ( ) . Be ( "/data/attributes/attributes " ) ;
245242 }
246243
247244 [ Fact ]
@@ -360,30 +357,30 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
360357 public async Task Can_update_resource_with_omitted_required_attribute_value ( )
361358 {
362359 // Arrange
363- SystemDirectory existingDirectory = _fakers . SystemDirectory . Generate ( ) ;
360+ SystemFile existingFile = _fakers . SystemFile . Generate ( ) ;
364361
365- long newSizeInBytes = _fakers . SystemDirectory . Generate ( ) . SizeInBytes ;
362+ long ? newSizeInBytes = _fakers . SystemFile . Generate ( ) . SizeInBytes ;
366363
367364 await _testContext . RunOnDatabaseAsync ( async dbContext =>
368365 {
369- dbContext . Directories . Add ( existingDirectory ) ;
366+ dbContext . Files . Add ( existingFile ) ;
370367 await dbContext . SaveChangesAsync ( ) ;
371368 } ) ;
372369
373370 var requestBody = new
374371 {
375372 data = new
376373 {
377- type = "systemDirectories " ,
378- id = existingDirectory . StringId ,
374+ type = "systemFiles " ,
375+ id = existingFile . StringId ,
379376 attributes = new
380377 {
381378 sizeInBytes = newSizeInBytes
382379 }
383380 }
384381 } ;
385382
386- string route = $ "/systemDirectories/ { existingDirectory . StringId } ";
383+ string route = $ "/systemFiles/ { existingFile . StringId } ";
387384
388385 // Act
389386 ( HttpResponseMessage httpResponse , string responseDocument ) = await _testContext . ExecutePatchAsync < string > ( route , requestBody ) ;
0 commit comments