public async Task <ApiResponse <PutResult <Guid> > > Put([FromBody] StateMachineInputDto dto) { var key = await _stateMachineService.Put(dto); var result = new PutResult <Guid>(key); return(ApiResponse.OK(result)); }
public async Task GetAll() { var firstId = await _service.Put( new StateMachineInputDto() { Name = "first name", Body = "first body" }); var secondId = await _service.Put( new StateMachineInputDto() { Name = "second name", Body = "second body" }); var all = await _service.GetAll(null); Assert.Equal(2, all.Count); Assert.True(all.Any(x => x.Id == firstId && x.Name == "first name" && x.Body == "first body")); Assert.True(all.Any(x => x.Id == secondId && x.Name == "second name" && x.Body == "second body")); }