Example #1
0
 public void CannotBeGeneratedWithNull()
 {
     Assert.Throws <ArgumentNullException>(() =>
     {
         var termination = Termination.Of(null);
     });
 }
Example #2
0
        public void ShouldExecuteActionWhenHasTerminated()
        {
            var expected    = false;
            var termination = Termination.Of(() =>
            {
                expected = true;
            });

            termination.Terminate();

            Assert.IsTrue(expected);
        }