update tests

This commit is contained in:
julian 2023-05-26 17:45:14 -06:00
parent 4564ee7e0a
commit 5c2465784e

View file

@ -126,12 +126,8 @@ void main() {
).thenThrow(Exception()); ).thenThrow(Exception());
final cachedClient = CachedElectrumX( final cachedClient = CachedElectrumX(
electrumXClient: client, electrumXClient: client,
port: 0, );
failovers: [],
server: '',
useSSL: true,
prefs: Prefs.instance);
expect( expect(
() async => await cachedClient.getTransaction( () async => await cachedClient.getTransaction(
@ -143,12 +139,8 @@ void main() {
test("clearSharedTransactionCache", () async { test("clearSharedTransactionCache", () async {
final cachedClient = CachedElectrumX( final cachedClient = CachedElectrumX(
server: '', electrumXClient: MockElectrumX(),
electrumXClient: MockElectrumX(), );
port: 0,
useSSL: true,
prefs: MockPrefs(),
failovers: []);
bool didThrow = false; bool didThrow = false;
try { try {
@ -174,11 +166,7 @@ void main() {
useSSL: true, useSSL: true,
); );
final client = CachedElectrumX.from( final client = CachedElectrumX.from(electrumXClient: MockElectrumX());
node: node,
prefs: MockPrefs(),
failovers: [],
electrumXClient: MockElectrumX());
expect(client, isA<CachedElectrumX>()); expect(client, isA<CachedElectrumX>());
}); });