예제 #1
0
        public void GetFunctionTemplateWithParams()
        {
            var r = GenericPresentationHelpers.GetFuncTemplate(
                new ChallengeSet <string[]>(
                    Guid.NewGuid(), "a", "b", this.intAndString, new Challenge <string[]>[] { }));

            r.Should().BeEquivalentTo("string[] Main(int i, string s) { return ... ; }");
        }
예제 #2
0
        public void GetFunctionTemplateNoParams()
        {
            var r = GenericPresentationHelpers.GetFuncTemplate(
                new ChallengeSet <string[]>(
                    Guid.NewGuid(), "a", "b", Array.Empty <ParamDescription>(), new Challenge <string[]>[] { }));

            r.Should().BeEquivalentTo("string[] Main() { return ... ; }");
        }