예제 #1
0
            public void should_stop_auto_polling_when_disposing_or_disposed()
            {
                using (TestedClass)
                {
                    Thread.Sleep(1000);
                    var _beforeDispose = modulePolledCount;
                    TestedClass.Dispose();
                    var _afterDispose = modulePolledCount;
                    Thread.Sleep(2000);

                    Assert.True(_beforeDispose <= modulePolledCount);
                    Assert.True(_afterDispose >= modulePolledCount);
                }
            }
예제 #2
0
 protected override void Because_Of()
 {
     TestedClass.Dispose();
 }