public static string RuleMethodStartToString( string expectedName, Variable[] expectedVariables, string ag, string sg, string eg ) { return "<%rule " + expectedName + "( " + (expectedVariables.Length > 0 ? expectedVariables .Select( variable => VariableUnitTest.VariableToString( variable, ag, sg, eg ) ) .Aggregate( ( s1, s2 ) => s1 + ag + s2 ) : "") + " )%>"; }