public virtual KeyAllocation MapBOToEF( BOKeyAllocation bo) { KeyAllocation efKeyAllocation = new KeyAllocation(); efKeyAllocation.SetProperties( bo.Allocated, bo.CollectionName); return(efKeyAllocation); }
public void MapEFToBO() { var mapper = new DALKeyAllocationMapper(); KeyAllocation entity = new KeyAllocation(); entity.SetProperties(1, "A"); BOKeyAllocation response = mapper.MapEFToBO(entity); response.Allocated.Should().Be(1); response.CollectionName.Should().Be("A"); }
public void MapEFToBOList() { var mapper = new DALKeyAllocationMapper(); KeyAllocation entity = new KeyAllocation(); entity.SetProperties(1, "A"); List <BOKeyAllocation> response = mapper.MapEFToBO(new List <KeyAllocation>() { entity }); response.Count.Should().Be(1); }