public void DisposeNoExceptionNoBatchingAndCaching() { // arrange FetchDataDelegate <string, string> fetch = CreateFetch <string, string>(); var batchScheduler = new ManualBatchScheduler(); var loader = new DataLoader <string, string>(fetch, batchScheduler); // act void Verify() => loader.Dispose(); // assert Assert.Null(Record.Exception(Verify)); }
public void DisposeNoExceptionNobatchingAndCaching() { // arrange FetchDataDelegate <string, string> fetch = TestHelpers.CreateFetch <string, string>(); var batchScheduler = new ManualBatchScheduler(); var loader = new DataLoader <string, string>(batchScheduler, fetch); // act Action verify = () => loader.Dispose(); // assert Assert.Null(Record.Exception(verify)); }
public void DisposeNoException() { // arrange FetchDataDelegate <string, string> fetch = async keys => await Task.FromResult(new IResult <string> [0]) .ConfigureAwait(false); var options = new DataLoaderOptions <string>(); var loader = new DataLoader <string, string>(options, fetch); // act Action verify = () => loader.Dispose(); // assert Assert.Null(Record.Exception(verify)); }