Esempio n. 1
0
        public void MapToGroupHeader_Group_ValidDto()
        {
            //arrange
            var ownerId     = 3;
            var groupId     = 5;
            var groupName   = "group #1";
            var group       = new Group(groupId, groupName, ownerId);
            var expectedDto = new GroupHeaderDto
            {
                Id   = groupId,
                Name = groupName
            };

            //act
            var mapper = new GroupServiceMapper(new OrganizationServiceMapper());
            var dto    = mapper.MapToGroupHeader(group);

            //assert
            dto.Should().BeEquivalentTo(expectedDto);
        }
Esempio n. 2
0
 public GroupReader(ReadOnlyAppDbContext dbContext, GroupServiceMapper groupMapper, OrganizationServiceMapper organizationMapper)
 {
     this.dbContext          = dbContext;
     this.groupMapper        = groupMapper;
     this.organizationMapper = organizationMapper;
 }