Пример #1
0
        public async Task Should_Create_A_Blog()
        {
            var name        = "test name";
            var shortName   = "test shortName";
            var description = "test description";

            var blogDto = await _blogManagementAppService.CreateAsync(new CreateBlogDto()
            {
                Name = name, ShortName = name, Description = description
            });

            UsingDbContext(context =>
            {
                var blog = context.Blogs.FirstOrDefault(q => q.Id == blogDto.Id);
                blog.ShouldNotBeNull();
                blog.Name.ShouldBe(blogDto.Name);
                blog.ShortName.ShouldBe(blogDto.ShortName);
                blog.Description.ShouldBe(blogDto.Description);
            });
        }
Пример #2
0
 public async Task <BlogDto> CreateAsync(CreateBlogDto input)
 {
     return(await _blogManagementAppService.CreateAsync(input));
 }