public void Dispose() { foreach (var store in Stores) { Xunit.Assert.True(PayTester.StoreRepository.DeleteStore(store).GetAwaiter().GetResult()); } if (PayTester != null) PayTester.Dispose(); }
public void Dispose() { Logs.Tester.LogInformation("Disposing the BTCPayTester..."); foreach (var store in Stores) { Xunit.Assert.True(PayTester.StoreRepository.DeleteStore(store).GetAwaiter().GetResult()); } if (PayTester != null) { PayTester.Dispose(); } Logs.Tester.LogInformation("BTCPayTester disposed"); }
public async Task <T> WaitForEvent <T>(Func <Task> action) { var tcs = new TaskCompletionSource <T>(TaskCreationOptions.RunContinuationsAsynchronously); var sub = PayTester.GetService <EventAggregator>().Subscribe <T>(evt => { tcs.TrySetResult(evt); }); await action.Invoke(); var result = await tcs.Task; sub.Dispose(); return(result); }
public Task StartAsync() { return(PayTester.StartAsync()); }
public void Start() { PayTester.Start(); }