コード例 #1
0
ファイル: FooTest.cs プロジェクト: urasandesu/Prig.Samples
        public void Prig_should_assert_on_generic_types_and_method()
        {
            using (new IndirectionsContext())
            {
                // Arrange
                var expected = "ping";

                var fooGenericProxy = new PProxyFooGeneric();
                fooGenericProxy.EchoOfTOfTRetT <string, string>().Body = (@this, s) => s;

                var fooGeneric = (FooGeneric)fooGenericProxy;


                // Act
                var actual = fooGeneric.Echo <string, string>(expected);


                // Assert
                Assert.AreEqual(expected, actual);
            }
        }
コード例 #2
0
ファイル: FooTest.cs プロジェクト: urasandesu/Prig.Samples
        public void Prig_should_assert_on_generic_types_and_method()
        {
            using (new IndirectionsContext())
            {
                // Arrange
                var expected = "ping";

                var fooGenericProxy = new PProxyFooGeneric();
                fooGenericProxy.EchoOfTOfTRetT<string, string>().Body = (@this, s) => s;

                var fooGeneric = (FooGeneric)fooGenericProxy;


                // Act
                var actual = fooGeneric.Echo<string, string>(expected);


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