public virtual ApiNuGetPackageResponseModel MapBOToModel(
            BONuGetPackage boNuGetPackage)
        {
            var model = new ApiNuGetPackageResponseModel();

            model.SetProperties(boNuGetPackage.Id, boNuGetPackage.JSON, boNuGetPackage.PackageId, boNuGetPackage.Version, boNuGetPackage.VersionBuild, boNuGetPackage.VersionMajor, boNuGetPackage.VersionMinor, boNuGetPackage.VersionRevision, boNuGetPackage.VersionSpecial);

            return(model);
        }
Beispiel #2
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiNuGetPackageModelMapper();
            var model  = new ApiNuGetPackageResponseModel();

            model.SetProperties("A", "A", "A", "A", 1, 1, 1, 1, "A");
            ApiNuGetPackageRequestModel response = mapper.MapResponseToRequest(model);

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