test code formatting

This commit is contained in:
Hervé Boutemy 2014-08-19 17:17:05 +02:00
parent ca2b26ac5d
commit 1ba9a6ffe0
1 changed files with 8 additions and 7 deletions

View File

@ -21,7 +21,8 @@
import junit.framework.TestCase;
public class MavenCliTest extends TestCase
public class MavenCliTest
extends TestCase
{
private MavenCli cli;
@ -34,16 +35,16 @@ public void testCalculateDegreeOfConcurrencyWithCoreMultiplier()
{
int cores = Runtime.getRuntime().availableProcessors();
// -T2.2C
assertEquals((int)(cores * 2.2), cli.calculateDegreeOfConcurrencyWithCoreMultiplier("C2.2"));
assertEquals( (int) ( cores * 2.2 ), cli.calculateDegreeOfConcurrencyWithCoreMultiplier( "C2.2" ) );
// -TC2.2
assertEquals((int)(cores * 2.2), cli.calculateDegreeOfConcurrencyWithCoreMultiplier("2.2C"));
assertEquals( (int) ( cores * 2.2 ), cli.calculateDegreeOfConcurrencyWithCoreMultiplier( "2.2C" ) );
try
{
cli.calculateDegreeOfConcurrencyWithCoreMultiplier("CXXX");
fail("Should have failed with a NumberFormatException");
}
catch( NumberFormatException e)
cli.calculateDegreeOfConcurrencyWithCoreMultiplier( "CXXX" );
fail( "Should have failed with a NumberFormatException" );
}
catch ( NumberFormatException e )
{
// carry on
}