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"); }
public async void TestUpdate() { var model = await this.CreateRecord(); ApiNuGetPackageModelMapper mapper = new ApiNuGetPackageModelMapper(); UpdateResponse <ApiNuGetPackageResponseModel> updateResponse = await this.Client.NuGetPackageUpdateAsync(model.Id, mapper.MapResponseToRequest(model)); updateResponse.Record.Should().NotBeNull(); updateResponse.Success.Should().BeTrue(); await this.Cleanup(); }