public void MapEFToBO() { var mapper = new DALDeviceActionMapper(); DeviceAction entity = new DeviceAction(); entity.SetProperties(1, 1, "A", "A"); BODeviceAction response = mapper.MapEFToBO(entity); response.DeviceId.Should().Be(1); response.Id.Should().Be(1); response.Name.Should().Be("A"); [email protected]().Be("A"); }
public void MapEFToBOList() { var mapper = new DALDeviceActionMapper(); DeviceAction entity = new DeviceAction(); entity.SetProperties(1, 1, "A", "A"); List <BODeviceAction> response = mapper.MapEFToBO(new List <DeviceAction>() { entity }); response.Count.Should().Be(1); }
public void MapBOToEF() { var mapper = new DALDeviceActionMapper(); var bo = new BODeviceAction(); bo.SetProperties(1, 1, "A", "A"); DeviceAction response = mapper.MapBOToEF(bo); response.DeviceId.Should().Be(1); response.Id.Should().Be(1); response.Name.Should().Be("A"); [email protected]().Be("A"); }