Skip to content

Commit

Permalink
renamed TestFormatter => TestNameFormatter
Browse files Browse the repository at this point in the history
  • Loading branch information
aaschmid committed Aug 9, 2014
1 parent 55a7982 commit e70d24c
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
public class DataProviderFrameworkMethodTest extends BaseTest {

@Mock
private TestNameFormatter formatter;
private TestNameFormatter testNameFormatter;

private final Method method = anyMethod();

Expand Down Expand Up @@ -65,17 +65,17 @@ public void testGetNameShouldReturnStringContainingMethodNameAndCallParametersFo
final Object[] parameters = new Object[] { 718, "718" };

DataProviderFrameworkMethod underTest = new DataProviderFrameworkMethod(method, 20, parameters);
underTest.setTestNameFormatter(formatter);
doReturn("test").when(formatter).format(method, 20, parameters);
underTest.setTestNameFormatter(testNameFormatter);
doReturn("test").when(testNameFormatter).format(method, 20, parameters);

// When:
String result = underTest.getName();

// Then:
assertThat(result).isEqualTo("test");

verify(formatter).format(method, 20, parameters);
verifyNoMoreInteractions(formatter);
verify(testNameFormatter).format(method, 20, parameters);
verifyNoMoreInteractions(testNameFormatter);
}

@Test
Expand Down

0 comments on commit e70d24c

Please sign in to comment.