Exemple #1
0
        public void Prig_should_assert_call_on_void()
        {
            using (new IndirectionsContext())
            {
                // Arrange
                var called          = false;
                PFoo.Execute().Body = @this => called = true;


                // Act
                new Foo().Execute();


                // Assert
                Assert.IsTrue(called);
            }
        }
Exemple #2
0
        public void Prig_should_assert_call_on_void_through_an_interface()
        {
            using (new IndirectionsContext())
            {
                // Arrange
                var called          = false;
                PFoo.Execute().Body = @this => called = true;
                var foo             = new Foo();


                // Act
                var iFoo = (IFoo)foo;
                iFoo.Execute();


                // Assert
                Assert.IsTrue(called);
            }
        }