@@ -28,10 +28,10 @@ public async Task StateResource_CreateFindDelete_IsSuccess()
2828 // Arrange
2929 var client = CreateClient ( true ) ;
3030 var name = Faker . Random . Word ( ) ;
31- var payload = GeneratePayload ( ) ;
31+ var state = StateFaker . Generate ( ) ;
3232
3333 // Act & Assert
34- var createResponse = await client . PostAsync ( $ "/state/{ name } ", payload ) ;
34+ var createResponse = await client . PostAsync ( $ "/state/{ name } ", Serialize ( state ) ) ;
3535 //TODO: test resource URL in response
3636 await createResponse . CheckResponseAndGetContent ( HttpStatusCode . OK , null , string . Empty ) ;
3737 var findResponse = await client . GetAsync ( $ "/state/{ name } ") ;
@@ -46,8 +46,8 @@ public async Task StateResource_LockLifeCycle_IsSuccess()
4646 // Arrange
4747 var client = CreateClient ( true ) ;
4848 var name = Faker . Random . Word ( ) ;
49+ var state = StateFaker . Generate ( ) ;
4950 var stateLock = StateLockFaker . Generate ( ) ;
50- var payload = GeneratePayload ( ) ;
5151
5252 // Act & Assert
5353 var createLockResponse = await client . PostAsync ( $ "/state/{ name } /lock", Serialize ( stateLock ) ) ;
@@ -56,11 +56,11 @@ public async Task StateResource_LockLifeCycle_IsSuccess()
5656 {
5757 Content = Serialize ( stateLock )
5858 } ;
59- var missingLockIdUpdateResponse = await client . PostAsync ( $ "/state/{ name } ", payload ) ;
59+ var missingLockIdUpdateResponse = await client . PostAsync ( $ "/state/{ name } ", Serialize ( state ) ) ;
6060 await missingLockIdUpdateResponse . CheckResponseAndGetContent ( HttpStatusCode . Locked , "application/json; charset=utf-8" , "{\" message\" :\" The state is locked.\" }" ) ;
61- var wrongLockIdUpdateResponse = await client . PostAsync ( $ "/state/{ name } ?ID=1234", payload ) ;
61+ var wrongLockIdUpdateResponse = await client . PostAsync ( $ "/state/{ name } ?ID=1234", Serialize ( state ) ) ;
6262 await wrongLockIdUpdateResponse . CheckResponseAndGetContent ( HttpStatusCode . Conflict , "text/plain; charset=utf-8" , "LockId doesn't match with the existing lock" ) ;
63- var updateResponse = await client . PostAsync ( $ "/state/{ name } ?ID={ stateLock . Id } ", payload ) ;
63+ var updateResponse = await client . PostAsync ( $ "/state/{ name } ?ID={ stateLock . Id } ", Serialize ( state ) ) ;
6464 await updateResponse . CheckResponseAndGetContent ( HttpStatusCode . OK , null , string . Empty ) ;
6565 var deleteLockResponse = await client . SendAsync ( deleteLockRequest ) ;
6666 await deleteLockResponse . CheckResponseAndGetContent ( HttpStatusCode . OK , null ) ;
0 commit comments