Exemplo n.º 1
0
        public void MapBOToModelList()
        {
            var            mapper = new BOLNuGetPackageMapper();
            BONuGetPackage bo     = new BONuGetPackage();

            bo.SetProperties("A", "A", "A", "A", 1, 1, 1, 1, "A");
            List <ApiNuGetPackageResponseModel> response = mapper.MapBOToModel(new List <BONuGetPackage>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
Exemplo n.º 2
0
        public void MapBOToModel()
        {
            var            mapper = new BOLNuGetPackageMapper();
            BONuGetPackage bo     = new BONuGetPackage();

            bo.SetProperties("A", "A", "A", "A", 1, 1, 1, 1, "A");
            ApiNuGetPackageResponseModel response = mapper.MapBOToModel(bo);

            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");
        }
Exemplo n.º 3
0
        public void MapBOToEF()
        {
            var mapper = new DALNuGetPackageMapper();
            var bo     = new BONuGetPackage();

            bo.SetProperties("A", "A", "A", "A", 1, 1, 1, 1, "A");

            NuGetPackage response = mapper.MapBOToEF(bo);

            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");
        }