Skip to content

Commit 169a267

Browse files
committed
dsl: refactoring + tests
1 parent fb88f3a commit 169a267

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/main/java/dsl/Mailer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Mailer to(String to) {
3131
return new Mailer(from, StringUtils.defaultIfEmpty(to, ""));
3232
}
3333

34-
public static void send(UnaryOperator<Mailer> block) {
34+
static void send(UnaryOperator<Mailer> block) {
3535
System.out.println(block.apply(EMPTY));
3636
}
3737
}

src/test/groovy/dsl/MailerTest.groovy

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ import spock.lang.Specification
66
* Created by mtumilowicz on 2018-11-30.
77
*/
88
class MailerTest extends Specification {
9-
def "_"() {
10-
// you don't have access to the object - you cannot reuse it later
11-
// there is NO Mailer object
9+
def "sending mail"() {
1210
Mailer.send({
1311
it.from("mtumilowicz01@gmail.com")
1412
.to("abc@o2.pl")

0 commit comments

Comments
 (0)