jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Schumacher <felix.schumac...@internetallee.de>
Subject Re: svn commit: r1816194 - /jmeter/trunk/test/src/org/apache/jmeter/functions/TestChangeCase.java
Date Sat, 25 Nov 2017 11:57:21 GMT
Am 23.11.2017 um 23:27 schrieb pmouawad@apache.org:
> Author: pmouawad
> Date: Thu Nov 23 22:27:35 2017
> New Revision: 1816194
>
> URL: http://svn.apache.org/viewvc?rev=1816194&view=rev
> Log:
> Refactored TestChangeCase
> Contributed by Graham Russell (@ham1)
> This closes #339
>
> Modified:
>      jmeter/trunk/test/src/org/apache/jmeter/functions/TestChangeCase.java
>
> Modified: jmeter/trunk/test/src/org/apache/jmeter/functions/TestChangeCase.java
> URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/functions/TestChangeCase.java?rev=1816194&r1=1816193&r2=1816194&view=diff
> ==============================================================================
> --- jmeter/trunk/test/src/org/apache/jmeter/functions/TestChangeCase.java (original)
> +++ jmeter/trunk/test/src/org/apache/jmeter/functions/TestChangeCase.java Thu Nov 23
22:27:35 2017
> @@ -20,8 +20,10 @@ package org.apache.jmeter.functions;
>   

...

>       @Test
>       public void testChangeCaseCamelCaseFirstLowerWithFirstUpperCaseChar() throws Exception
{
> -        params.add(new CompoundVariable("Ab-CD eF"));
> -        params.add(new CompoundVariable("lower_CAMEL_CASE"));
> -        changeCase.setParameters(params);
> -        String returnValue = changeCase.execute(result, null);
> +        String returnValue = execute("Ab-CD eF", "lower_CAMEL_CASE");
>           assertEquals("abCdEf", returnValue);
> -
> -        params.clear();
> -        params.add(new CompoundVariable(" zadad"));
> -        params.add(new CompoundVariable("lower_CAMEL_CASE"));
> -        changeCase.setParameters(params);
> -        returnValue = changeCase.execute(result, null);
> +
> +        returnValue = execute(" zadad", "lower_CAMEL_CASE");
>           assertEquals("Zadad", returnValue);

Is "Zadad" really the expected result for "[SPACE]zadad" in lower camel 
case?

I would prefer to trim the input before conversion, so that we would get 
"zadad" in this case.

Felix

>   
>


Mime
View raw message