Beispiel #1
0
 public void End_NotEnded_Ends()
 {
     using (var era = new Era())
     {
         era.End();
         Assert.That(era.HasEnded);
     }
 }
Beispiel #2
0
        public void End_Disposed_ThrowsObjectDisposedException()
        {
            var era = new Era();

            era.Dispose();

            Assert.Throws <ObjectDisposedException>(() => era.End());
        }
Beispiel #3
0
        public void WaitAsync_NotEnded_WaitsForEnd()
        {
            using (var era = new Era())
            {
                var awaiter = era.WaitAsync();

                TaskAssert.DoesNotEnd(awaiter);
                era.End();
                TaskAssert.Completed(awaiter);
            }
        }