Class org.lightningj.paywall.paymenthandler.PaymentDataConverterSpec

25

tests

0

failures

0

ignored

0.029s

duration

100%

successful

Tests

Test Duration Result
Verify populatePaymentDataFromInvoice sets all expected fields for a FullPaymentData 0.001s passed
Verify populatePaymentDataFromInvoice sets all expected fields for a MinimalPaymentData 0s passed
Verify populatePaymentDataFromInvoice sets all expected fields for a StandardPaymentData 0s passed
Verify that basicCheck throws InternalErrorException if paymentData is null. 0s passed
Verify that convertToInvoice converts FullPaymentData into Invoice for unsettled invoice. 0.001s passed
Verify that convertToInvoice converts FullPaymentData into Invoice without looking up the invoice in LightningHandler. 0.004s passed
Verify that convertToInvoice fetches the invoice from LightningHandler if payment data is of type StandardPaymentData. 0.004s passed
Verify that convertToInvoice throws InternalErrorException if lightningHandler cannot lookup the related invoice if payment data is of type StandardPaymentData. 0.001s passed
Verify that convertToInvoice throws InternalErrorException if payment data isn't implementing MinimalPaymentData 0.001s passed
Verify that convertToOrder converts a MinimalPaymentData correctly. 0.002s passed
Verify that convertToOrder converts a StandardPaymentData correctly if expire data is NOT set. 0.004s passed
Verify that convertToOrder converts a StandardPaymentData correctly if expire data is set. 0s passed
Verify that convertToOrder throws InternalErrorException if payment data isn't implementing MinimalPaymentData 0.002s passed
Verify that convertToSettlement converts FullPaymentData using default settlement duration if neither settlementExpireDate nor settlementDuration are set. 0s passed
Verify that convertToSettlement converts FullPaymentData using settlementDuration if settlementExpireDate is not set. 0.001s passed
Verify that convertToSettlement converts FullPaymentData with payment data valid from set in settlement. 0.001s passed
Verify that convertToSettlement converts MinimalPaymentData correctly 0s passed
Verify that convertToSettlement converts StandardPaymentData with default validity duration. 0.001s passed
Verify that convertToSettlement converts StandardPaymentData with payment data validity if set. 0s passed
Verify that convertToSettlement includes invoice if includeInvoice is set. 0.002s passed
Verify that convertToSettlement throws InternalErrorException if payment data isn't implementing MinimalPaymentData 0.001s passed
Verify that isSettled returns false if paymentData.isSettled is false 0.001s passed
Verify that isSettled returns true if paymentData.isSettled is true 0s passed
Verify that isSettled throws InternalErrorException if paymentData doesn't implement MinimalPaymentData 0.001s passed
Verify that populatePaymentDataFromInvoice throws InternalErrorException if payment data isn't implementing MinimalPaymentData 0.001s passed