public virtual DeploymentRelatedMachine MapBOToEF( BODeploymentRelatedMachine bo) { DeploymentRelatedMachine efDeploymentRelatedMachine = new DeploymentRelatedMachine(); efDeploymentRelatedMachine.SetProperties( bo.DeploymentId, bo.Id, bo.MachineId); return(efDeploymentRelatedMachine); }
public void MapEFToBO() { var mapper = new DALDeploymentRelatedMachineMapper(); DeploymentRelatedMachine entity = new DeploymentRelatedMachine(); entity.SetProperties("A", 1, "A"); BODeploymentRelatedMachine response = mapper.MapEFToBO(entity); response.DeploymentId.Should().Be("A"); response.Id.Should().Be(1); response.MachineId.Should().Be("A"); }
public void MapEFToBOList() { var mapper = new DALDeploymentRelatedMachineMapper(); DeploymentRelatedMachine entity = new DeploymentRelatedMachine(); entity.SetProperties("A", 1, "A"); List <BODeploymentRelatedMachine> response = mapper.MapEFToBO(new List <DeploymentRelatedMachine>() { entity }); response.Count.Should().Be(1); }