public async Task CanCreateInvoiceUsingConnectionString() { ILightningClientFactory factory = new LightningClientFactory(Tester.Network); var connectionStrings = Docker ? new[] { "type=charge;server=http://api-token:foiewnccewuify@charge:9112", "type=lnd-rest;server=https://lnd_dest:8080;allowinsecure=true", "type=clightning;server=tcp://lightningd:9835", "type=eclair;server=http://eclair:8080;password=bukkake;bitcoin-host=bitcoind:43782;bitcoin-auth=ceiwHEbqWI83:DwubwWsoo3" } : new[] { "type=charge;server=http://api-token:[email protected]:37462", "type=lnd-rest;server=https://127.0.0.1:42802;allowinsecure=true", "type=clightning;server=tcp://127.0.0.1:48532", "type=eclair;server=http://127.0.0.1:4570;password=bukkake;bitcoin-host=127.0.0.1:37393;bitcoin-auth=ceiwHEbqWI83:DwubwWsoo3" }; foreach (var connectionString in connectionStrings) { ILightningClient client = factory.Create(connectionString); var createdInvoice = await client.CreateInvoice(10000, "CanCreateInvoice", TimeSpan.FromMinutes(5)); var retrievedInvoice = await client.GetInvoice(createdInvoice.Id); AssertUnpaid(createdInvoice); AssertUnpaid(retrievedInvoice); } }
public async Task CanCreateInvoiceUsingConnectionString() { ILightningClientFactory factory = new LightningClientFactory(Tester.Network); foreach (var connectionString in new[] { "type=charge;server=http://api-token:[email protected]:37462", "type=lnd-rest;server=https://127.0.0.1:42802;allowinsecure=true", "type=clightning;server=tcp://127.0.0.1:48532" }) { ILightningClient client = factory.Create(connectionString); var createdInvoice = await client.CreateInvoice(10000, "CanCreateInvoice", TimeSpan.FromMinutes(5)); var retrievedInvoice = await client.GetInvoice(createdInvoice.Id); AssertUnpaid(createdInvoice); AssertUnpaid(retrievedInvoice); } }
public async Task CanCreateInvoiceUsingConnectionString() { ILightningClientFactory factory = new LightningClientFactory(Tester.Network); var connectionStrings = Docker ? new[] { "type=charge;server=http://api-token:foiewnccewuify@charge:9112;allowinsecure=true", "type=lnd-rest;server=http://lnd_dest:8080;allowinsecure=true", "type=clightning;server=tcp://lightningd:9835", "type=eclair;server=http://eclair:8080;password=bukkake" } : new[] { "type=charge;server=http://api-token:[email protected]:37462;allowinsecure=true", "type=lnd-rest;server=http://127.0.0.1:42802;allowinsecure=true", "type=clightning;server=tcp://127.0.0.1:48532", "type=eclair;server=http://127.0.0.1:4570;password=bukkake" }; var clientTypes = Tester.GetLightningClients().Select(l => l.Client.GetType()).ToArray(); foreach (var connectionString in connectionStrings) { ILightningClient client = factory.Create(connectionString); if (!clientTypes.Contains(client.GetType())) { continue; } var createdInvoice = await client.CreateInvoice(10000, "CanCreateInvoice", TimeSpan.FromMinutes(5)); var retrievedInvoice = await client.GetInvoice(createdInvoice.Id); AssertUnpaid(createdInvoice); AssertUnpaid(retrievedInvoice); } }