示例#1
0
        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);
        }
示例#2
0
        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");
        }