public DepositReportItemForRpc(DepositReportItem report) { Id = report.Id; AssetId = report.AssetId; AssetName = report.AssetName; Provider = report.Provider; ProviderName = report.ProviderName; Value = report.Value; Units = report.Units; Consumer = report.Consumer; Completed = report.Completed; Timestamp = report.Timestamp; ExpiryTime = report.ExpiryTime; Expired = report.Expired; TransactionHash = report.TransactionHash; ConfirmationTimestamp = report.ConfirmationTimestamp; Confirmations = report.Confirmations; RequiredConfirmations = report.RequiredConfirmations; Confirmed = report.Confirmed; Rejected = report.Rejected; ClaimedRefundTransactionHash = report.ClaimedRefundTransactionHash; RefundClaimed = report.RefundClaimed; ConsumedUnits = report.ConsumedUnits; ClaimedUnits = report.ClaimedUnits; RefundedUnits = report.RefundedUnits; RemainingUnits = report.RemainingUnits; ClaimedValue = report.ClaimedValue; RefundedValue = report.RefundedValue; RemainingValue = report.RemainingValue; Receipts = report.Receipts.Select(r => new DataDeliveryReceiptReportItemForRpc(r)); }
private static void VerifyDepositReportItem(DepositReportItemForRpc rpcItem, DepositReportItem item) { rpcItem.Id.Should().Be(item.Id); rpcItem.AssetId.Should().Be(item.AssetId); rpcItem.AssetName.Should().Be(item.AssetName); rpcItem.Provider.Should().Be(item.Provider); rpcItem.ProviderName.Should().Be(item.ProviderName); rpcItem.Value.Should().Be(item.Value); rpcItem.Units.Should().Be(item.Units); rpcItem.Completed.Should().Be(item.Completed); rpcItem.Timestamp.Should().Be(item.Timestamp); rpcItem.ExpiryTime.Should().Be(item.ExpiryTime); rpcItem.Expired.Should().Be(item.Expired); rpcItem.TransactionHash.Should().Be(item.TransactionHash); rpcItem.ConfirmationTimestamp.Should().Be(item.ConfirmationTimestamp); rpcItem.Confirmations.Should().Be(item.Confirmations); rpcItem.RequiredConfirmations.Should().Be(item.RequiredConfirmations); rpcItem.Confirmed.Should().Be(item.Confirmed); rpcItem.ClaimedRefundTransactionHash.Should().Be(item.ClaimedRefundTransactionHash); rpcItem.RefundClaimed.Should().Be(item.RefundClaimed); rpcItem.ConsumedUnits.Should().Be(item.ConsumedUnits); rpcItem.ClaimedUnits.Should().Be(item.ClaimedUnits); rpcItem.RefundedUnits.Should().Be(item.RefundedUnits); rpcItem.RemainingUnits.Should().Be(item.RemainingUnits); rpcItem.ClaimedValue.Should().Be(item.ClaimedValue); rpcItem.RefundedValue.Should().Be(item.RefundedValue); rpcItem.RemainingValue.Should().Be(item.RemainingValue); rpcItem.Receipts.Should().ContainSingle(); item.Receipts.Should().ContainSingle(); VerifyDataDeliveryReceiptReportItem(rpcItem.Receipts.Single(), item.Receipts.Single()); }