public override async Task InitializeAsync()
        {
            await base.DisposeAsync();

            createProjectCommand = new CreateProjectCommand("project1", true);
            createProjectDto     = await SendAsync(createProjectCommand);
        }
Example #2
0
        public ActionResult <ItemDto> createItem(CreatedItemDto itemDto)
        {
            Item item = new Item()
            {
                Id          = Guid.NewGuid(),
                Name        = itemDto.Name,
                Price       = itemDto.Price,
                CreatedDate = DateTimeOffset.UtcNow
            };

            repository.CreateItem(item);
            return(CreatedAtAction(nameof(GetItem), new { id = item.Id }, item.AsDto()));
        }
Example #3
0
        public override async Task InitializeAsync()
        {
            await base.DisposeAsync();

            createProjectCommand = new CreateProjectCommand("project1", true);
            createProjectDto     = await SendAsync(createProjectCommand);

            createFeatureCommand = new CreateFeatureCommand("feature1", createProjectDto.Id);
            createFeatureDto     = await SendAsync(createFeatureCommand);

            createScenarioCommand = new CreateScenarioCommand("s1", createProjectDto.Id);
            createScenarioDto     = await SendAsync(createScenarioCommand);
        }