summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-06-26 14:56:31 +0300
committerLeif Åstrand <leif@vaadin.com>2012-06-26 14:56:51 +0300
commitaa98b6f5438b5726cccce945e468d457c7a969a4 (patch)
treeee9b631c59fabcbb75176bcba6e3dd07320aed82 /tests
parent1bcde71af737c5d4a3d80e86cfd69f7b2dc4ec62 (diff)
downloadvaadin-framework-aa98b6f5438b5726cccce945e468d457c7a969a4.tar.gz
vaadin-framework-aa98b6f5438b5726cccce945e468d457c7a969a4.zip
Move test component out of main source folder
Diffstat (limited to 'tests')
-rw-r--r--tests/testbench/com/vaadin/tests/extensions/HelloWorldExtension.java39
-rw-r--r--tests/testbench/com/vaadin/tests/extensions/HelloWorldExtensionTest.java1
2 files changed, 39 insertions, 1 deletions
diff --git a/tests/testbench/com/vaadin/tests/extensions/HelloWorldExtension.java b/tests/testbench/com/vaadin/tests/extensions/HelloWorldExtension.java
new file mode 100644
index 0000000000..d0f0994af3
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/extensions/HelloWorldExtension.java
@@ -0,0 +1,39 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.tests.extensions;
+
+import com.vaadin.terminal.AbstractExtension;
+import com.vaadin.terminal.gwt.client.ui.helloworldfeature.GreetAgainRpc;
+import com.vaadin.terminal.gwt.client.ui.helloworldfeature.HelloWorldRpc;
+import com.vaadin.terminal.gwt.client.ui.helloworldfeature.HelloWorldState;
+import com.vaadin.ui.Notification;
+
+public class HelloWorldExtension extends AbstractExtension {
+
+ public HelloWorldExtension() {
+ registerRpc(new HelloWorldRpc() {
+ public void onMessageSent(String message) {
+ Notification.show(message);
+ }
+ });
+ }
+
+ @Override
+ public HelloWorldState getState() {
+ return (HelloWorldState) super.getState();
+ }
+
+ public void setGreeting(String greeting) {
+ getState().setGreeting(greeting);
+ requestRepaint();
+ }
+
+ public String getGreeting() {
+ return getState().getGreeting();
+ }
+
+ public void greetAgain() {
+ getRpcProxy(GreetAgainRpc.class).greetAgain();
+ }
+}
diff --git a/tests/testbench/com/vaadin/tests/extensions/HelloWorldExtensionTest.java b/tests/testbench/com/vaadin/tests/extensions/HelloWorldExtensionTest.java
index b56e05b2a0..1671673198 100644
--- a/tests/testbench/com/vaadin/tests/extensions/HelloWorldExtensionTest.java
+++ b/tests/testbench/com/vaadin/tests/extensions/HelloWorldExtensionTest.java
@@ -7,7 +7,6 @@ import com.vaadin.terminal.WrappedRequest;
import com.vaadin.tests.components.AbstractTestRoot;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
-import com.vaadin.ui.HelloWorldExtension;
public class HelloWorldExtensionTest extends AbstractTestRoot {