Skip to content

Commit

Permalink
Spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Herault committed Aug 20, 2012
1 parent 1fa373f commit 8672a83
Showing 1 changed file with 7 additions and 7 deletions.
Expand Up @@ -159,7 +159,7 @@ public void plansNamedCorrectlyWithParameterizedField() throws Exception {
}

@RunWith(Parameterized.class)
static public class BadIndexForAnnotedFieldTest {
static public class BadIndexForAnnotatedFieldTest {
@Parameters
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][] { { 0 } });
Expand All @@ -182,16 +182,16 @@ private int fib(int x) {

@Test
public void failureOnInitialization() {
Result result = JUnitCore.runClasses(BadIndexForAnnotedFieldTest.class);
Result result = JUnitCore.runClasses(BadIndexForAnnotatedFieldTest.class);
assertEquals(2, result.getFailureCount());
List<Failure> failures = result.getFailures();
assertEquals("Invalid @parameter value: 2. @parameter fields counted: 1. Please use an index between 0 and 0.",
assertEquals("Invalid @Parameter value: 2. @Parameter fields counted: 1. Please use an index between 0 and 0.",
failures.get(0).getException().getMessage());
assertEquals("The index 0 is never used.", failures.get(1).getException().getMessage());
assertEquals("@Parameter(0) is never used.", failures.get(1).getException().getMessage());
}

@RunWith(Parameterized.class)
static public class BadNumberOfAnnotedFieldTest {
static public class BadNumberOfAnnotatedFieldTest {
@Parameters
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][] { { 0, 0 } });
Expand All @@ -214,10 +214,10 @@ private int fib(int x) {

@Test
public void numberOfFieldsAndParametersShouldMatch() {
Result result = JUnitCore.runClasses(BadNumberOfAnnotedFieldTest.class);
Result result = JUnitCore.runClasses(BadNumberOfAnnotatedFieldTest.class);
assertEquals(1, result.getFailureCount());
List<Failure> failures = result.getFailures();
assertTrue(failures.get(0).getException().getMessage().contains("Wrong number of parameters and @parameter fields. @parameter fields counted: 1, available parameters: 2."));
assertTrue(failures.get(0).getException().getMessage().contains("Wrong number of parameters and @Parameter fields. @Parameter fields counted: 1, available parameters: 2."));
}

private static String fLog;
Expand Down

0 comments on commit 8672a83

Please sign in to comment.