NSoft.NFramework.DisposableActionFixture.DisposableActionWhichCalledAtDisposing C# (CSharp) Method

DisposableActionWhichCalledAtDisposing() private method

private DisposableActionWhichCalledAtDisposing ( ) : void
return void
        public void DisposableActionWhichCalledAtDisposing() {
            TestTool
                .RunTasks(5,
                          () => {
                              bool calledAtDisposing = false;

                              using(new DisposableAction(() => { calledAtDisposing = true; })) {
                                  Thread.Sleep(50);
                                  Assert.IsFalse(calledAtDisposing);
                              }

                              Assert.IsTrue(calledAtDisposing);
                          });
        }