public virtual TimestampCheck MapBOToEF( BOTimestampCheck bo) { TimestampCheck efTimestampCheck = new TimestampCheck(); efTimestampCheck.SetProperties( bo.Id, bo.Name, bo.Timestamp); return(efTimestampCheck); }
public void MapEntityToModel() { var mapper = new DALTimestampCheckMapper(); TimestampCheck item = new TimestampCheck(); item.SetProperties(1, "A", BitConverter.GetBytes(1)); ApiTimestampCheckServerResponseModel response = mapper.MapEntityToModel(item); response.Id.Should().Be(1); response.Name.Should().Be("A"); response.Timestamp.Should().BeEquivalentTo(BitConverter.GetBytes(1)); }
public void MapEntityToModelList() { var mapper = new DALTimestampCheckMapper(); TimestampCheck item = new TimestampCheck(); item.SetProperties(1, "A", BitConverter.GetBytes(1)); List <ApiTimestampCheckServerResponseModel> response = mapper.MapEntityToModel(new List <TimestampCheck>() { { item } }); response.Count.Should().Be(1); }
public void MapEFToBO() { var mapper = new DALTimestampCheckMapper(); TimestampCheck entity = new TimestampCheck(); entity.SetProperties(1, "A", BitConverter.GetBytes(1)); BOTimestampCheck response = mapper.MapEFToBO(entity); response.Id.Should().Be(1); response.Name.Should().Be("A"); response.Timestamp.Should().BeEquivalentTo(BitConverter.GetBytes(1)); }
public virtual TimestampCheck MapModelToEntity( int id, ApiTimestampCheckServerRequestModel model ) { TimestampCheck item = new TimestampCheck(); item.SetProperties( id, model.Name, model.Timestamp); return(item); }
public void MapEFToBOList() { var mapper = new DALTimestampCheckMapper(); TimestampCheck entity = new TimestampCheck(); entity.SetProperties(1, "A", BitConverter.GetBytes(1)); List <BOTimestampCheck> response = mapper.MapEFToBO(new List <TimestampCheck>() { entity }); response.Count.Should().Be(1); }