Enforce checkstyle for unit test codes
- First time contributer is likely to start with unit-test code,
so it is probably better to enforce the ONOS code style for
unit test codes also.
Change-Id: Id665e55b0f0bee7232dfb18ce6a7f9ea8cc3b164
diff --git a/src/test/java/net/onrc/onos/core/datastore/hazelcast/HZTableTest.java b/src/test/java/net/onrc/onos/core/datastore/hazelcast/HZTableTest.java
index 3be5061..3f43e38 100644
--- a/src/test/java/net/onrc/onos/core/datastore/hazelcast/HZTableTest.java
+++ b/src/test/java/net/onrc/onos/core/datastore/hazelcast/HZTableTest.java
@@ -192,7 +192,8 @@
}
@Test(expected = ObjectDoesntExistException.class)
- public void testUpdateByteArrayByteArrayLongFailNoOldValue() throws ObjectDoesntExistException, WrongVersionException {
+ public void testUpdateByteArrayByteArrayLongFailNoOldValue()
+ throws ObjectDoesntExistException, WrongVersionException {
final byte[] key = name.getMethodName().getBytes(StandardCharsets.UTF_8);
final byte[] value = "SomeValue".getBytes(StandardCharsets.UTF_8);
@@ -204,7 +205,8 @@
}
@Test(expected = WrongVersionException.class)
- public void testUpdateByteArrayByteArrayLongFailWrongVersion() throws ObjectDoesntExistException, WrongVersionException {
+ public void testUpdateByteArrayByteArrayLongFailWrongVersion()
+ throws ObjectDoesntExistException, WrongVersionException {
final byte[] key = name.getMethodName().getBytes(StandardCharsets.UTF_8);
final byte[] oldValue = "OldValue".getBytes(StandardCharsets.UTF_8);
final byte[] value = "SomeValue".getBytes(StandardCharsets.UTF_8);
@@ -250,7 +252,8 @@
}
@Test
- public void testUpdateByteArrayByteArraySuccessIgnoreVersion() throws ObjectDoesntExistException, WrongVersionException {
+ public void testUpdateByteArrayByteArraySuccessIgnoreVersion()
+ throws ObjectDoesntExistException, WrongVersionException {
final byte[] key = name.getMethodName().getBytes(StandardCharsets.UTF_8);
final byte[] oldValue = "OldValue".getBytes(StandardCharsets.UTF_8);
final byte[] value = "SomeValue".getBytes(StandardCharsets.UTF_8);
@@ -341,9 +344,9 @@
@Test
public void testGetAllEntries() {
- final int DATASETSIZE = 100;
+ final int dataSetSize = 100;
final Map<byte[], VersionedValue> testdata = new TreeMap<>(ByteArrayComparator.BYTEARRAY_COMPARATOR);
- for (int i = 0; i < DATASETSIZE; ++i) {
+ for (int i = 0; i < dataSetSize; ++i) {
final byte[] key = (name.getMethodName() + i).getBytes(StandardCharsets.UTF_8);
final byte[] value = ("Value" + i).getBytes(StandardCharsets.UTF_8);