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