Beispiel #1
0
        public void SuppressExecution_throws_if_called_after_execution()
        {
            var data = new InterceptionContextMutableData { HasExecuted = true };

            Assert.Equal(
                Strings.SuppressionAfterExecution,
                Assert.Throws<InvalidOperationException>(() => data.SuppressExecution()).Message);

            Assert.False(data.IsSuppressed);
        }
Beispiel #2
0
        public void SuppressExecution_can_be_called_before_execution()
        {
            var data = new InterceptionContextMutableData();

            Assert.False(data.IsSuppressed);

            data.SuppressExecution();

            Assert.True(data.IsSuppressed);
        }
        public void SuppressExecution_can_be_called_before_execution()
        {
            var data = new InterceptionContextMutableData();

            Assert.False(data.IsSuppressed);

            data.SuppressExecution();

            Assert.True(data.IsSuppressed);
        }
        public void SuppressExecution_throws_if_called_after_execution()
        {
            var data = new InterceptionContextMutableData {
                HasExecuted = true
            };

            Assert.Equal(
                Strings.SuppressionAfterExecution,
                Assert.Throws <InvalidOperationException>(() => data.SuppressExecution()).Message);

            Assert.False(data.IsSuppressed);
        }
 /// <inheritdoc />
 public override void SuppressExecution()
 {
     _mutableData.SuppressExecution();
 }