Example #1
0
        public void IntSelfReturn(int someValue)
        {
            var rule          = new SelfReturnRule <int>();
            var compileResult = rule.Compile();

            compileResult.Should().BeTrue();
            _testOutputHelper.WriteLine($"selfReturnRule for Int:{Environment.NewLine}" +
                                        $"{rule.ExpressionDebugView()}");

            var value = rule.Get(someValue);

            value.Should().Be(someValue);
        }
Example #2
0
        public void StringSelfReturn(string someValue)
        {
            var rule          = new SelfReturnRule <string>();
            var compileResult = rule.Compile();

            compileResult.Should().BeTrue();
            _testOutputHelper.WriteLine($"selfReturnRule for String:{Environment.NewLine}" +
                                        $"{rule.ExpressionDebugView()}");

            var value = rule.Get(someValue);

            value.Should().Be(someValue);

            var referenceEquals = ReferenceEquals(someValue, value);

            referenceEquals.Should().BeTrue();
        }