示例#1
0
        public void Prig_should_create_mock_for_a_sealed_class_with_internal_constructor()
        {
            using (new IndirectionsContext())
            {
                // Arrange
                var fooProxy = new PProxyFooSealedInternal();
                fooProxy.EchoInt32().Body = (@this, arg1) => 10;
                var foo = (FooSealedInternal)fooProxy;


                // Act
                var actual = foo.Echo(1);


                // Assert
                Assert.AreEqual(10, actual);
            }
        }
示例#2
0
        public void Prig_should_create_mock_for_a_sealed_class_with_internal_constructor()
        {
            using (new IndirectionsContext())
            {
                // Arrange
                var fooProxy = new PProxyFooSealedInternal();
                fooProxy.EchoInt32().Body = (@this, arg1) => 10;
                var foo = (FooSealedInternal)fooProxy;


                // Act
                var actual = foo.Echo(1);


                // Assert
                Assert.AreEqual(10, actual);
            }
        }