mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 06:24:24 +01:00
Use nicer representation of payment methods in the Greenfield API
This commit is contained in:
@@ -151,6 +151,36 @@ namespace BTCPayServer.Tests
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Fast", "Fast")]
|
||||
public void CanParsePaymentMethodId()
|
||||
{
|
||||
var id = PaymentMethodId.Parse("BTC");
|
||||
var id1 = PaymentMethodId.Parse("BTC-OnChain");
|
||||
var id2 = PaymentMethodId.Parse("BTC-BTCLike");
|
||||
Assert.Equal(id, id1);
|
||||
Assert.Equal(id, id2);
|
||||
Assert.Equal("BTC", id.ToString());
|
||||
Assert.Equal("BTC", id.ToString());
|
||||
id = PaymentMethodId.Parse("LTC");
|
||||
Assert.Equal("LTC", id.ToString());
|
||||
Assert.Equal("LTC", id.ToStringNormalized());
|
||||
id = PaymentMethodId.Parse("LTC-offchain");
|
||||
id1 = PaymentMethodId.Parse("LTC-OffChain");
|
||||
id2 = PaymentMethodId.Parse("LTC-LightningLike");
|
||||
Assert.Equal(id, id1);
|
||||
Assert.Equal(id, id2);
|
||||
Assert.Equal("LTC_LightningLike", id.ToString());
|
||||
Assert.Equal("LTC-LightningNetwork", id.ToStringNormalized());
|
||||
#if ALTCOINS
|
||||
id = PaymentMethodId.Parse("XMR");
|
||||
id1 = PaymentMethodId.Parse("XMR-MoneroLike");
|
||||
Assert.Equal(id, id1);
|
||||
Assert.Equal("XMR_MoneroLike", id.ToString());
|
||||
Assert.Equal("XMR", id.ToStringNormalized());
|
||||
#endif
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Fast", "Fast")]
|
||||
public async Task CheckNoDeadLink()
|
||||
|
||||
Reference in New Issue
Block a user