public void MapEntityToModel() { var mapper = new DALTeacherTeacherSkillMapper(); TeacherTeacherSkill item = new TeacherTeacherSkill(); item.SetProperties(1, 1, 1); ApiTeacherTeacherSkillServerResponseModel response = mapper.MapEntityToModel(item); response.Id.Should().Be(1); response.TeacherId.Should().Be(1); response.TeacherSkillId.Should().Be(1); }
public void MapEntityToModelList() { var mapper = new DALTeacherTeacherSkillMapper(); TeacherTeacherSkill item = new TeacherTeacherSkill(); item.SetProperties(1, 1, 1); List <ApiTeacherTeacherSkillServerResponseModel> response = mapper.MapEntityToModel(new List <TeacherTeacherSkill>() { { item } }); response.Count.Should().Be(1); }
public virtual TeacherTeacherSkill MapModelToEntity( int id, ApiTeacherTeacherSkillServerRequestModel model ) { TeacherTeacherSkill item = new TeacherTeacherSkill(); item.SetProperties( id, model.TeacherId, model.TeacherSkillId); return(item); }