public async Task <OrderType> BuildAsync() { var headers = await _defaultRequestHeadersService.GetAsync(); var id = await _orderTypesClient.CreateAsync(_type, headers); return(await _orderTypesClient.GetAsync(id, headers)); }
public async Task WhenCreate_ThenSuccess() { var headers = await _defaultRequestHeadersService.GetAsync(); var type = new OrderType { Id = Guid.NewGuid(), Name = "Test".WithGuid(), IsDeleted = false }; var createdTypeId = await _orderTypesClient.CreateAsync(type, headers); var createdType = await _orderTypesClient.GetAsync(createdTypeId, headers); Assert.NotNull(createdType); Assert.Equal(createdTypeId, createdType.Id); Assert.Equal(type.Name, createdType.Name); Assert.Equal(type.IsDeleted, createdType.IsDeleted); Assert.True(createdType.CreateDateTime.IsMoreThanMinValue()); }