public Task UpdateAsync( CrmTaskStatus status, Dictionary <string, string> headers = default, CancellationToken ct = default) { return(_factory.PatchAsync(_host + "/Tasks/Statuses/v1/Update", null, status, headers, ct)); }
public async Task WhenCreate_ThenSuccess() { var headers = await _defaultRequestHeadersService.GetAsync(); var status = new CrmTaskStatus { Id = Guid.NewGuid(), Name = "Test".WithGuid(), IsDeleted = false }; var createdStatusId = await _taskStatusesClient.CreateAsync(status, headers); var createdStatus = await _taskStatusesClient.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()); }