public void Run_Given_ClassWithLevelThreeDepth_With_DepthAs1ConcurrencyIssues_Should_ThrowConcurrencyException() { var instance = new ClassWithLevelThreeDepth(); var finder = new ConcurrencyChecker(instance, null, 2000, 1); finder.Assert(800, () => { instance.ChildPropDepthOne.ChildProp.StringProp = "two"; }, () => { instance.ChildPropDepthOne.ChildProp.StringProp = "three"; }); }
public void Run_Given_ClassWithLevelThreeDepth_With_DepthAs3AndConcurrencyIssues_Should_ThrowConcurrencyException() { var instance = new ClassWithLevelThreeDepth(); var finder = new ConcurrencyChecker(instance, null, 2000, 3); var error = Assert.Throws <ConcurrencyException>(() => finder.Assert(1500, () => { instance.ChildPropDepthOne.ChildProp.StringProp = "two"; }, () => { instance.ChildPropDepthOne.ChildProp.StringProp = "three"; })); Console.WriteLine(error.Message); }