assert_eq!(offer.paths(), &[]);
assert_eq!(offer.issuer(), None);
assert_eq!(offer.supported_quantity(), Quantity::One);
+ assert!(!offer.expects_quantity());
assert_eq!(offer.signing_pubkey(), Some(pubkey(42)));
assert_eq!(
.build()
.unwrap();
let tlv_stream = offer.as_tlv_stream();
+ assert!(!offer.expects_quantity());
assert_eq!(offer.supported_quantity(), Quantity::One);
assert_eq!(tlv_stream.quantity_max, None);
.build()
.unwrap();
let tlv_stream = offer.as_tlv_stream();
+ assert!(offer.expects_quantity());
assert_eq!(offer.supported_quantity(), Quantity::Unbounded);
assert_eq!(tlv_stream.quantity_max, Some(0));
.build()
.unwrap();
let tlv_stream = offer.as_tlv_stream();
+ assert!(offer.expects_quantity());
assert_eq!(offer.supported_quantity(), Quantity::Bounded(ten));
assert_eq!(tlv_stream.quantity_max, Some(10));
.build()
.unwrap();
let tlv_stream = offer.as_tlv_stream();
+ assert!(offer.expects_quantity());
assert_eq!(offer.supported_quantity(), Quantity::Bounded(one));
assert_eq!(tlv_stream.quantity_max, Some(1));
.build()
.unwrap();
let tlv_stream = offer.as_tlv_stream();
+ assert!(!offer.expects_quantity());
assert_eq!(offer.supported_quantity(), Quantity::One);
assert_eq!(tlv_stream.quantity_max, None);
}