summaryrefslogtreecommitdiffstats
path: root/server/tests/src/com/vaadin/util
diff options
context:
space:
mode:
authorSauli Tähkäpää <sauli@vaadin.com>2015-01-02 16:10:52 +0200
committerVaadin Code Review <review@vaadin.com>2015-01-05 19:41:24 +0000
commit0c9625d05c829a66b2b42fb5c3f14384d8c0f4a8 (patch)
tree3a3fa1e3e0a523f31e1c979038a1f88f5fc4f821 /server/tests/src/com/vaadin/util
parent26832b6947266ce5cffd92558c23e6556278038d (diff)
downloadvaadin-framework-0c9625d05c829a66b2b42fb5c3f14384d8c0f4a8.tar.gz
vaadin-framework-0c9625d05c829a66b2b42fb5c3f14384d8c0f4a8.zip
Unify test class naming.
Unit tests are now run for *Test.java and *Tests.java. Change-Id: Iffff1d9a79c7c9b9317ffd19b5a46715b1442909
Diffstat (limited to 'server/tests/src/com/vaadin/util')
-rw-r--r--server/tests/src/com/vaadin/util/CurrentInstanceTest.java (renamed from server/tests/src/com/vaadin/util/TestCurrentInstance.java)42
-rw-r--r--server/tests/src/com/vaadin/util/ReflectToolsGetFieldValueByTypeTest.java (renamed from server/tests/src/com/vaadin/util/ReflectToolsGetFieldValueByType.java)2
-rw-r--r--server/tests/src/com/vaadin/util/ReflectToolsGetPrimitiveFieldValueTest.java (renamed from server/tests/src/com/vaadin/util/ReflectToolsGetPrimitiveFieldValue.java)2
3 files changed, 23 insertions, 23 deletions
diff --git a/server/tests/src/com/vaadin/util/TestCurrentInstance.java b/server/tests/src/com/vaadin/util/CurrentInstanceTest.java
index 666a0ef019..36055a036a 100644
--- a/server/tests/src/com/vaadin/util/TestCurrentInstance.java
+++ b/server/tests/src/com/vaadin/util/CurrentInstanceTest.java
@@ -30,7 +30,7 @@ import com.vaadin.server.VaadinService;
import com.vaadin.server.VaadinSession;
import com.vaadin.ui.UI;
-public class TestCurrentInstance {
+public class CurrentInstanceTest {
@Test
public void testInitiallyCleared() throws Exception {
@@ -39,20 +39,20 @@ public class TestCurrentInstance {
@Test
public void testClearedAfterRemove() throws Exception {
- CurrentInstance.set(TestCurrentInstance.class, this);
+ CurrentInstance.set(CurrentInstanceTest.class, this);
Assert.assertEquals(this,
- CurrentInstance.get(TestCurrentInstance.class));
- CurrentInstance.set(TestCurrentInstance.class, null);
+ CurrentInstance.get(CurrentInstanceTest.class));
+ CurrentInstance.set(CurrentInstanceTest.class, null);
assertCleared();
}
@Test
public void testClearedAfterRemoveInheritable() throws Exception {
- CurrentInstance.setInheritable(TestCurrentInstance.class, this);
+ CurrentInstance.setInheritable(CurrentInstanceTest.class, this);
Assert.assertEquals(this,
- CurrentInstance.get(TestCurrentInstance.class));
- CurrentInstance.setInheritable(TestCurrentInstance.class, null);
+ CurrentInstance.get(CurrentInstanceTest.class));
+ CurrentInstance.setInheritable(CurrentInstanceTest.class, null);
assertCleared();
}
@@ -61,19 +61,19 @@ public class TestCurrentInstance {
public void testInheritableThreadLocal() throws Exception {
final AtomicBoolean threadFailed = new AtomicBoolean(true);
- CurrentInstance.setInheritable(TestCurrentInstance.class, this);
+ CurrentInstance.setInheritable(CurrentInstanceTest.class, this);
Assert.assertEquals(this,
- CurrentInstance.get(TestCurrentInstance.class));
+ CurrentInstance.get(CurrentInstanceTest.class));
Thread t = new Thread() {
@Override
public void run() {
- Assert.assertEquals(TestCurrentInstance.this,
- CurrentInstance.get(TestCurrentInstance.class));
+ Assert.assertEquals(CurrentInstanceTest.this,
+ CurrentInstance.get(CurrentInstanceTest.class));
threadFailed.set(false);
}
};
t.start();
- CurrentInstance.set(TestCurrentInstance.class, null);
+ CurrentInstance.set(CurrentInstanceTest.class, null);
assertCleared();
while (t.isAlive()) {
@@ -87,16 +87,16 @@ public class TestCurrentInstance {
public void testClearedAfterRemoveInSeparateThread() throws Exception {
final AtomicBoolean threadFailed = new AtomicBoolean(true);
- CurrentInstance.setInheritable(TestCurrentInstance.class, this);
+ CurrentInstance.setInheritable(CurrentInstanceTest.class, this);
Assert.assertEquals(this,
- CurrentInstance.get(TestCurrentInstance.class));
+ CurrentInstance.get(CurrentInstanceTest.class));
Thread t = new Thread() {
@Override
public void run() {
try {
- Assert.assertEquals(TestCurrentInstance.this,
- CurrentInstance.get(TestCurrentInstance.class));
- CurrentInstance.set(TestCurrentInstance.class, null);
+ Assert.assertEquals(CurrentInstanceTest.this,
+ CurrentInstance.get(CurrentInstanceTest.class));
+ CurrentInstance.set(CurrentInstanceTest.class, null);
assertCleared();
threadFailed.set(false);
@@ -115,18 +115,18 @@ public class TestCurrentInstance {
// Clearing the threadlocal in the thread should not have cleared it
// here
Assert.assertEquals(this,
- CurrentInstance.get(TestCurrentInstance.class));
+ CurrentInstance.get(CurrentInstanceTest.class));
// Clearing the only remaining threadlocal should free all memory
- CurrentInstance.set(TestCurrentInstance.class, null);
+ CurrentInstance.set(CurrentInstanceTest.class, null);
assertCleared();
}
@Test
public void testClearedWithClearAll() throws Exception {
- CurrentInstance.set(TestCurrentInstance.class, this);
+ CurrentInstance.set(CurrentInstanceTest.class, this);
Assert.assertEquals(this,
- CurrentInstance.get(TestCurrentInstance.class));
+ CurrentInstance.get(CurrentInstanceTest.class));
CurrentInstance.clearAll();
assertCleared();
diff --git a/server/tests/src/com/vaadin/util/ReflectToolsGetFieldValueByType.java b/server/tests/src/com/vaadin/util/ReflectToolsGetFieldValueByTypeTest.java
index 25f8ba7796..67796314c0 100644
--- a/server/tests/src/com/vaadin/util/ReflectToolsGetFieldValueByType.java
+++ b/server/tests/src/com/vaadin/util/ReflectToolsGetFieldValueByTypeTest.java
@@ -5,7 +5,7 @@ import static org.junit.Assert.fail;
import org.junit.Test;
-public class ReflectToolsGetFieldValueByType {
+public class ReflectToolsGetFieldValueByTypeTest {
@Test
public void getFieldValue() {
class MyClass {
diff --git a/server/tests/src/com/vaadin/util/ReflectToolsGetPrimitiveFieldValue.java b/server/tests/src/com/vaadin/util/ReflectToolsGetPrimitiveFieldValueTest.java
index 690f77d9a5..40e8f05e1e 100644
--- a/server/tests/src/com/vaadin/util/ReflectToolsGetPrimitiveFieldValue.java
+++ b/server/tests/src/com/vaadin/util/ReflectToolsGetPrimitiveFieldValueTest.java
@@ -4,7 +4,7 @@ import static org.junit.Assert.assertFalse;
import org.junit.Test;
-public class ReflectToolsGetPrimitiveFieldValue {
+public class ReflectToolsGetPrimitiveFieldValueTest {
@Test
public void getFieldValueViaGetter() {
class MyClass {