Fixed checkstyle code quality issues
This commit is contained in:
parent
1d9aff4071
commit
2e2707862a
@ -32,13 +32,13 @@ public class TreeTest extends StdOutTest {
|
||||
private static final Node TREE_ROOT;
|
||||
|
||||
static {
|
||||
final NodeImpl level1_b = new NodeImpl("level1_b", NullNode.getInstance(), NullNode.getInstance());
|
||||
final NodeImpl level2_b = new NodeImpl("level2_b", NullNode.getInstance(), NullNode.getInstance());
|
||||
final NodeImpl level3_a = new NodeImpl("level3_a", NullNode.getInstance(), NullNode.getInstance());
|
||||
final NodeImpl level3_b = new NodeImpl("level3_b", NullNode.getInstance(), NullNode.getInstance());
|
||||
final NodeImpl level2_a = new NodeImpl("level2_a", level3_a, level3_b);
|
||||
final NodeImpl level1_a = new NodeImpl("level1_a", level2_a, level2_b);
|
||||
TREE_ROOT = new NodeImpl("root", level1_a, level1_b);
|
||||
final NodeImpl level1B = new NodeImpl("level1_b", NullNode.getInstance(), NullNode.getInstance());
|
||||
final NodeImpl level2B = new NodeImpl("level2_b", NullNode.getInstance(), NullNode.getInstance());
|
||||
final NodeImpl level3A = new NodeImpl("level3_a", NullNode.getInstance(), NullNode.getInstance());
|
||||
final NodeImpl level3B = new NodeImpl("level3_b", NullNode.getInstance(), NullNode.getInstance());
|
||||
final NodeImpl level2A = new NodeImpl("level2_a", level3A, level3B);
|
||||
final NodeImpl level1A = new NodeImpl("level1_a", level2A, level2B);
|
||||
TREE_ROOT = new NodeImpl("root", level1A, level1B);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -17,10 +17,10 @@ public class ConsumerTest extends StdOutTest {
|
||||
@Test
|
||||
public void testConsume() throws Exception {
|
||||
final Message[] messages = new Message[]{
|
||||
createMessage("you", "Hello!"),
|
||||
createMessage("me", "Hi!"),
|
||||
Message.POISON_PILL,
|
||||
createMessage("late_for_the_party", "Hello? Anyone here?"),
|
||||
createMessage("you", "Hello!"),
|
||||
createMessage("me", "Hi!"),
|
||||
Message.POISON_PILL,
|
||||
createMessage("late_for_the_party", "Hello? Anyone here?"),
|
||||
};
|
||||
|
||||
final MessageQueue queue = new SimpleMessageQueue(messages.length);
|
||||
|
@ -18,8 +18,8 @@ public class StewTest extends StdOutTest {
|
||||
@Test
|
||||
public void testMix() {
|
||||
final ImmutableStew stew = new ImmutableStew(1, 2, 3, 4);
|
||||
final String expectedMessage = "Mixing the immutable stew we find: 1 potatoes, " +
|
||||
"2 carrots, 3 meat and 4 peppers";
|
||||
final String expectedMessage = "Mixing the immutable stew we find: 1 potatoes, "
|
||||
+ "2 carrots, 3 meat and 4 peppers";
|
||||
|
||||
final InOrder inOrder = inOrder(getStdOutMock());
|
||||
for (int i = 0; i < 20; i++) {
|
||||
|
@ -30,7 +30,7 @@ public class ConsumerTest extends StdOutTest {
|
||||
for (int id = 0; id < ITEM_COUNT; id++) {
|
||||
consumer.consume();
|
||||
inOrder.verify(getStdOutMock())
|
||||
.println("Consumer [consumer] consume item [" + id + "] produced by [producer]");
|
||||
.println("Consumer [consumer] consume item [" + id + "] produced by [producer]");
|
||||
}
|
||||
|
||||
inOrder.verifyNoMoreInteractions();
|
||||
|
@ -15,10 +15,10 @@ public class WizardTowerProxyTest extends StdOutTest {
|
||||
@Test
|
||||
public void testEnter() throws Exception {
|
||||
final Wizard[] wizards = new Wizard[]{
|
||||
new Wizard("Gandalf"),
|
||||
new Wizard("Dumbledore"),
|
||||
new Wizard("Oz"),
|
||||
new Wizard("Merlin")
|
||||
new Wizard("Gandalf"),
|
||||
new Wizard("Dumbledore"),
|
||||
new Wizard("Oz"),
|
||||
new Wizard("Merlin")
|
||||
};
|
||||
|
||||
final WizardTowerProxy tower = new WizardTowerProxy();
|
||||
|
@ -15,10 +15,10 @@ public class WizardTowerTest extends StdOutTest {
|
||||
@Test
|
||||
public void testEnter() throws Exception {
|
||||
final Wizard[] wizards = new Wizard[]{
|
||||
new Wizard("Gandalf"),
|
||||
new Wizard("Dumbledore"),
|
||||
new Wizard("Oz"),
|
||||
new Wizard("Merlin")
|
||||
new Wizard("Gandalf"),
|
||||
new Wizard("Dumbledore"),
|
||||
new Wizard("Oz"),
|
||||
new Wizard("Merlin")
|
||||
};
|
||||
|
||||
final WizardTower tower = new WizardTower();
|
||||
|
@ -2,7 +2,11 @@ package com.iluwatar.servicelocator;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertSame;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
/**
|
||||
* Date: 12/29/15 - 19:07 PM
|
||||
@ -26,7 +30,7 @@ public class ServiceLocatorTest {
|
||||
@Test
|
||||
public void testServiceCache() {
|
||||
final String[] serviceNames = new String[]{
|
||||
"jndi/serviceA", "jndi/serviceB"
|
||||
"jndi/serviceA", "jndi/serviceB"
|
||||
};
|
||||
|
||||
for (final String serviceName : serviceNames) {
|
||||
|
@ -1,17 +1,15 @@
|
||||
package com.iluwatar.state;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Application test
|
||||
*
|
||||
*/
|
||||
public class AppTest {
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void test() {
|
||||
String[] args = {};
|
||||
App.main(args);
|
||||
|
Loading…
x
Reference in New Issue
Block a user