public void Run_Given_ClassWithNoConcurrencyIssue_When_Calling_AsyncMethod_Should_ReturnWithNoIssues() { var instance = new ClassWithNoConcurrencyIssues(); var finder = new ConcurrencyChecker(instance); var report = finder.Run(5, async() => await instance.DoSomeWorkAndReturnResponseAsync(), async() => await instance.DoSomeWorkAndReturnResponseAsync()); Console.WriteLine(report); Assert.IsNull(report); }
public void Run_Given_ClassWithNoConcurrencyIssue_When_Calling_AsyncMethod_Should_Succeed() { var instance = new ClassWithNoConcurrencyIssues(); ConcurrencyChecker.AssertAsyncDeadlocksOnly(async() => await instance.DoSomeWorkAndReturnResponseAsync(), 200); }