Ejemplo n.º 1
0
        public void ToString_should_be_callable_indirectly()
        {
            using (new IndirectionsContext())
            {
                // Arrange
                PULNullable <int> .ToString().Body = (ref ULNullable <int> @this) => "42";

                // Act
                var actual = new ULNullable <int>(100).ToString();

                // Assert
                Assert.AreEqual("42", actual);
            }
        }
Ejemplo n.º 2
0
        public void ToString_should_be_callable_indirectly()
        {
            using (new IndirectionsContext())
            {
                // Arrange
                PULNullable<int>.ToString().Body = (ref ULNullable<int> @this) => "42";

                // Act
                var actual = new ULNullable<int>(100).ToString();

                // Assert
                Assert.AreEqual("42", actual);
            }
        }