public void MapEFToBOList() { var mapper = new DALNuGetPackageMapper(); NuGetPackage entity = new NuGetPackage(); entity.SetProperties("A", "A", "A", "A", 1, 1, 1, 1, "A"); List <BONuGetPackage> response = mapper.MapEFToBO(new List <NuGetPackage>() { entity }); response.Count.Should().Be(1); }
public virtual NuGetPackage MapBOToEF( BONuGetPackage bo) { NuGetPackage efNuGetPackage = new NuGetPackage(); efNuGetPackage.SetProperties( bo.Id, bo.JSON, bo.PackageId, bo.Version, bo.VersionBuild, bo.VersionMajor, bo.VersionMinor, bo.VersionRevision, bo.VersionSpecial); return(efNuGetPackage); }
public void MapEFToBO() { var mapper = new DALNuGetPackageMapper(); NuGetPackage entity = new NuGetPackage(); entity.SetProperties("A", "A", "A", "A", 1, 1, 1, 1, "A"); BONuGetPackage response = mapper.MapEFToBO(entity); response.Id.Should().Be("A"); response.JSON.Should().Be("A"); response.PackageId.Should().Be("A"); response.Version.Should().Be("A"); response.VersionBuild.Should().Be(1); response.VersionMajor.Should().Be(1); response.VersionMinor.Should().Be(1); response.VersionRevision.Should().Be(1); response.VersionSpecial.Should().Be("A"); }