Пример #1
0
        public async Task ShouldGetTag()
        {
            var createTagCommand = new CreateTagCommand("t1", createProjectDto.Id);
            var createTagDto     = await SendAsync(createTagCommand);

            var getTagQuery = new GetTagQuery(createTagDto.Id, createProjectDto.Id);
            var getTagDto   = await SendAsync(getTagQuery);

            getTagDto.ShouldNotBeNull();
            getTagDto.Name.ShouldBe("t1");
            getTagDto.Description.ShouldBeNull();
            getTagDto.ProjectId.ShouldBe(createProjectDto.Id);

            var deleteTagCommand = new DeleteTagCommand(createTagDto.Id, createProjectDto.Id);

            await SendAsync(deleteTagCommand);
        }
Пример #2
0
 public async Task <IActionResult> Get([FromRoute] GetTagQuery query)
 {
     return(await Execute(query));
 }