@@ -53,7 +53,6 @@ public void TearDown()
5353 [ TestCase ( "Variable,1" , false ) ]
5454 [ TestCase ( "Variable.1" , false ) ]
5555 [ TestCase ( "Variable[1" , false ) ]
56- [ TestCase ( "Variable[1" , false ) ]
5756 [ TestCase ( "Variable(1" , false ) ]
5857 [ TestCase ( "Variable1)" , false ) ]
5958 [ TestCase ( "[Variable1]" , false ) ]
@@ -107,13 +106,13 @@ public void Test_ParseInvalidVariableNoCurlyBracket(string inputKeyword, string
107106 Assert . That ( output , Is . EqualTo ( expected ) ) ;
108107 }
109108
110- [ TestCase ( "Variable1" , "VariableA" , 1 ) ]
111- [ TestCase ( "Variable2" , "VariableB" , 2 ) ]
112- [ TestCase ( "Variable3" , "VariableC" , 3 ) ]
113- [ TestCase ( "Variable4" , "VariableD" , 4 ) ]
114- public void Test_ParseVariableIndex ( string inputKeyword , string outputKeyword , int index )
109+ [ TestCase ( "Variable1" , "VariableA" , "1" ) ]
110+ [ TestCase ( "Variable2" , "VariableB" , "2" ) ]
111+ [ TestCase ( "Variable3" , "VariableC" , "3" ) ]
112+ [ TestCase ( "Variable4" , "VariableD" , "4" ) ]
113+ public void Test_ParseVariableIndex ( string inputKeyword , string outputKeyword , string index )
115114 {
116- var indexStr = "(" + index . ToString ( ) + ")" ;
115+ var indexStr = "(" + index + ")" ;
117116 var input = "{" + inputKeyword + indexStr + "}" ;
118117 var expected = outputKeyword + indexStr ;
119118 var output = ProcessTemplate . ReplaceVariable ( input , delegateGetNewText ) ;
@@ -124,18 +123,25 @@ public void Test_ParseVariableIndex(string inputKeyword, string outputKeyword, i
124123 }
125124
126125
127- [ TestCase ( "Variable1" , "VariableA" , 1 , "[" , "]" ) ]
128- [ TestCase ( "Variable2" , "VariableB" , 2 , "{" , "}" ) ]
129- [ TestCase ( "Variable3" , "VariableC" , 3 , "<" , ">" ) ]
130- [ TestCase ( "Variable4" , "VariableD" , 4 , "[" , "" ) ]
131- [ TestCase ( "Variable5" , "VariableE" , 5 , "{" , "" ) ]
132- [ TestCase ( "Variable6" , "VariableF" , 6 , "(" , "" ) ]
133- [ TestCase ( "Variable7" , "VariableG" , 7 , "" , "]" ) ]
134- [ TestCase ( "Variable8" , "VariableH" , 8 , "" , "}" ) ]
135- [ TestCase ( "Variable9" , "VariableI" , 9 , "" , ")" ) ]
136- public void Test_ParseVariableInvalidIndex ( string inputKeyword , string outputKeyword , int index , string left , string right )
126+ [ TestCase ( "Variable1" , "VariableA" , "1" , "[" , "]" ) ]
127+ [ TestCase ( "Variable2" , "VariableB" , "2" , "{" , "}" ) ]
128+ [ TestCase ( "Variable3" , "VariableC" , "3" , "<" , ">" ) ]
129+ [ TestCase ( "Variable4" , "VariableD" , "4" , "[" , "" ) ]
130+ [ TestCase ( "Variable5" , "VariableE" , "5" , "{" , "" ) ]
131+ [ TestCase ( "Variable6" , "VariableF" , "6" , "(" , "" ) ]
132+ [ TestCase ( "Variable7" , "VariableG" , "7" , "" , "]" ) ]
133+ [ TestCase ( "Variable8" , "VariableH" , "8" , "" , "}" ) ]
134+ [ TestCase ( "Variable9" , "VariableI" , "9" , "" , ")" ) ]
135+ [ TestCase ( "Variable1" , "VariableA" , "a" , "(" , ")" ) ]
136+ [ TestCase ( "Variable1" , "VariableA" , "ab" , "(" , ")" ) ]
137+ [ TestCase ( "Variable1" , "VariableA" , "123ab" , "(" , ")" ) ]
138+ [ TestCase ( "Variable1" , "VariableA" , "-1" , "(" , ")" ) ]
139+ [ TestCase ( "Variable1" , "VariableA" , "+1" , "(" , ")" ) ]
140+ [ TestCase ( "Variable1" , "VariableA" , "_1" , "(" , ")" ) ]
141+ [ TestCase ( "Variable1" , "VariableA" , "1_" , "(" , ")" ) ]
142+ public void Test_ParseVariableInvalidIndex ( string inputKeyword , string outputKeyword , string index , string left , string right )
137143 {
138- var indexStr = left + index . ToString ( ) + right ;
144+ var indexStr = left + index + right ;
139145 var input = "{" + inputKeyword + indexStr + "}" ;
140146 var expected = input ;
141147 var output = ProcessTemplate . ReplaceVariable ( input , delegateGetNewText ) ;
0 commit comments