Example #1
0
        public void GetParameterModifier_OutParameter_ShouldReturnOutKeyword()
        {
            var method    = typeof(SampleClass).GetMethod("Method10");
            var parameter = method.GetParameters()[1];
            var result    = CSharpSourceCodeGeneration.GetParameterModifier(parameter);

            result.Should().Be("out ");
        }
Example #2
0
        public void GetParameterModifier_RefParameter_ShouldReturnRefKeyword()
        {
            var method    = typeof(SampleClass).GetMethod("Method8");
            var parameter = method.GetParameters()[0];
            var result    = CSharpSourceCodeGeneration.GetParameterModifier(parameter);

            result.Should().Be("ref ");
        }