Skip to content

Commit fabfe8b

Browse files
committed
Remove the term Method Reference from example code.
1 parent 8b16e91 commit fabfe8b

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/main/java/de/codecentric/java8examples/methodreference/MethodReference.java renamed to src/main/java/de/codecentric/java8examples/methodreference/Foo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* Time: 16:27
88
* To change this template use File | Settings | File Templates.
99
*/
10-
public class MethodReference {
10+
public class Foo {
1111

1212
public String doSomething() {
13-
return "MethodReference.doSomething()";
13+
return "Foo.doSomething()";
1414
}
1515
}

src/test/java/de/codecentric/java8examples/methodreference/MethodReferenceTest.java renamed to src/test/java/de/codecentric/java8examples/methodreference/MethodReferenceExampleTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@
1414
* Time: 16:29
1515
* To change this template use File | Settings | File Templates.
1616
*/
17-
public class MethodReferenceTest {
17+
public class MethodReferenceExampleTest {
1818

19-
private MethodReference ref;
19+
private Foo myFoo;
2020

2121
@Before
2222
public void setUp() throws Exception {
23-
ref = new MethodReference();
23+
myFoo = new Foo();
2424
}
2525

2626
@Test
27-
public void callingMethodFromRunnable() throws Exception {
28-
Callable<String> callable = ref::doSomething;
27+
public void methodReferencToFooMethod() throws Exception {
28+
Callable<String> callable = myFoo::doSomething;
2929

30-
assertEquals(ref.doSomething(), callable.call());
30+
assertEquals(myFoo.doSomething(), callable.call());
3131
}
3232
}

0 commit comments

Comments
 (0)