public async Task <OrderStatus> BuildAsync() { var headers = await _defaultRequestHeadersService.GetAsync(); var id = await _orderStatusesClient.CreateAsync(_status, headers); return(await _orderStatusesClient.GetAsync(id, headers)); }
public async Task WhenCreate_ThenSuccess() { var headers = await _defaultRequestHeadersService.GetAsync(); var status = new OrderStatus { Id = Guid.NewGuid(), Name = "Test".WithGuid(), IsDeleted = false }; var createdStatusId = await _orderStatusesClient.CreateAsync(status, headers); var createdStatus = await _orderStatusesClient.GetAsync(createdStatusId, headers); Assert.NotNull(createdStatus); Assert.Equal(createdStatusId, createdStatus.Id); Assert.Equal(status.Name, createdStatus.Name); Assert.Equal(status.IsDeleted, createdStatus.IsDeleted); Assert.True(createdStatus.CreateDateTime.IsMoreThanMinValue()); }