Ejemplo n.º 1
0
        public async Task <TaskType> BuildAsync()
        {
            var headers = await _defaultRequestHeadersService.GetAsync();

            var id = await _taskTypesClient.CreateAsync(_type, headers);

            return(await _taskTypesClient.GetAsync(id, headers));
        }
Ejemplo n.º 2
0
        public async Task WhenCreate_ThenSuccess()
        {
            var headers = await _defaultRequestHeadersService.GetAsync();

            var type = new TaskType
            {
                Id        = Guid.NewGuid(),
                Name      = "Test".WithGuid(),
                IsDeleted = false
            };

            var createdTypeId = await _taskTypesClient.CreateAsync(type, headers);

            var createdType = await _taskTypesClient.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());
        }