public void PublicToOpenBanking_SimpleMap_To_v3_1_2()
        {
            var mapper = new EntityMapper();

            var m1 = new Meta
            {
                FirstAvailableDateTime = DateTimeOffset.MaxValue,
                LastAvailableDateTime  = DateTimeOffset.UnixEpoch,
                TotalPages             = 123
            };

            var r1 =
                mapper.Map(m1, typeof(ObModels.PaymentInitiation.V3p1p2.Model.Meta)) as
                ObModels.PaymentInitiation.V3p1p2.Model.Meta;

            r1.Should().NotBeNull();
            m1.FirstAvailableDateTime.Should().Be(r1.FirstAvailableDateTime);
            m1.LastAvailableDateTime.Should().Be(r1.LastAvailableDateTime);
            m1.TotalPages.Should().Be(r1.TotalPages);
        }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OBWritePaymentDetailsResponse1" /> class.
 /// </summary>
 /// <param name="data">data (required).</param>
 /// <param name="links">links.</param>
 /// <param name="meta">meta.</param>
 public OBWritePaymentDetailsResponse1(OBWritePaymentDetailsResponse1Data data = default(OBWritePaymentDetailsResponse1Data), Links links = default(Links), Meta meta = default(Meta))
 {
     // to ensure "data" is required (not null)
     this.Data  = data ?? throw new ArgumentNullException("data is a required property for OBWritePaymentDetailsResponse1 and cannot be null");
     this.Links = links;
     this.Meta  = meta;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="OBWriteDomesticScheduledConsentResponse4" /> class.
 /// </summary>
 /// <param name="data">data (required).</param>
 /// <param name="risk">risk (required).</param>
 /// <param name="links">links.</param>
 /// <param name="meta">meta.</param>
 public OBWriteDomesticScheduledConsentResponse4(OBWriteDomesticScheduledConsentResponse4Data data = default(OBWriteDomesticScheduledConsentResponse4Data), OBRisk1 risk = default(OBRisk1), Links links = default(Links), Meta meta = default(Meta))
 {
     // to ensure "data" is required (not null)
     this.Data = data ?? throw new ArgumentNullException("data is a required property for OBWriteDomesticScheduledConsentResponse4 and cannot be null");
     // to ensure "risk" is required (not null)
     this.Risk  = risk ?? throw new ArgumentNullException("risk is a required property for OBWriteDomesticScheduledConsentResponse4 and cannot be null");
     this.Links = links;
     this.Meta  = meta;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="OBWriteInternationalStandingOrderResponse6" /> class.
 /// </summary>
 /// <param name="data">data (required).</param>
 /// <param name="links">links.</param>
 /// <param name="meta">meta.</param>
 public OBWriteInternationalStandingOrderResponse6(OBWriteInternationalStandingOrderResponse6Data data = default(OBWriteInternationalStandingOrderResponse6Data), Links links = default(Links), Meta meta = default(Meta))
 {
     // to ensure "data" is required (not null)
     this.Data  = data ?? throw new ArgumentNullException("data is a required property for OBWriteInternationalStandingOrderResponse6 and cannot be null");
     this.Links = links;
     this.Meta  = meta;
 }