Turned on checkstyle

This commit is contained in:
Marcin Grzejszczak
2019-02-01 15:48:32 +01:00
parent 94e9b8f2f8
commit e4b08a083c
268 changed files with 5114 additions and 3993 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017 the original author or authors.
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,31 +16,29 @@
package com.example;
import static org.junit.Assert.assertEquals;
import java.util.List;
import org.junit.Test;
import com.example.functions.CharCounter;
import com.example.functions.Exclaimer;
import com.example.functions.Greeter;
import org.junit.Test;
import reactor.core.publisher.Flux;
import static org.junit.Assert.assertEquals;
public class FunctionTests {
private final SampleApplication functions = new SampleApplication();
@Test
public void testUppercase() {
String output = functions.uppercase().apply("foobar");
String output = this.functions.uppercase().apply("foobar");
assertEquals("FOOBAR", output);
}
@Test
public void testLowercase() {
Flux<String> output = functions.lowercase().apply(Flux.just("FOO", "BAR"));
Flux<String> output = this.functions.lowercase().apply(Flux.just("FOO", "BAR"));
List<String> results = output.collectList().block();
assertEquals(2, results.size());
assertEquals("foo", results.get(0));
@@ -49,13 +47,13 @@ public class FunctionTests {
@Test
public void testHello() {
String output = functions.hello().get();
assertEquals("hello", output);
String output = this.functions.hello().get();
assertEquals("hello", output);
}
@Test
public void testWords() {
Flux<String> output = functions.words().get();
Flux<String> output = this.functions.words().get();
List<String> results = output.collectList().block();
assertEquals(2, results.size());
assertEquals("foo", results.get(0));
@@ -81,4 +79,5 @@ public class FunctionTests {
public void testCharCounter() {
assertEquals((Integer) 21, new CharCounter().apply("this is 21 chars long"));
}
}