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