diff options
Diffstat (limited to 'uitest/src/com/vaadin/tests/application/DeploymentConfigurationTest.java')
-rw-r--r-- | uitest/src/com/vaadin/tests/application/DeploymentConfigurationTest.java | 53 |
1 files changed, 38 insertions, 15 deletions
diff --git a/uitest/src/com/vaadin/tests/application/DeploymentConfigurationTest.java b/uitest/src/com/vaadin/tests/application/DeploymentConfigurationTest.java index 799622b31d..9a51980c9e 100644 --- a/uitest/src/com/vaadin/tests/application/DeploymentConfigurationTest.java +++ b/uitest/src/com/vaadin/tests/application/DeploymentConfigurationTest.java @@ -1,25 +1,48 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ package com.vaadin.tests.application; -import java.util.Properties; +import static org.junit.Assert.assertTrue; -import com.vaadin.server.VaadinRequest; -import com.vaadin.ui.Label; -import com.vaadin.ui.UI; -import com.vaadin.ui.VerticalLayout; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; -public class DeploymentConfigurationTest extends UI { +import org.junit.Test; - @Override - protected void init(VaadinRequest request) { - VerticalLayout layout = new VerticalLayout(); - layout.setMargin(true); - setContent(layout); +import com.vaadin.testbench.elements.LabelElement; +import com.vaadin.tests.tb3.MultiBrowserTest; - Properties params = getSession().getConfiguration().getInitParameters(); +public class DeploymentConfigurationTest extends MultiBrowserTest { - for (Object key : params.keySet()) { - layout.addComponent(new Label(key + ": " - + params.getProperty((String) key))); + @Test + public void testParameters() { + openTestURL(); + List<String> texts = new ArrayList<String>(Arrays.asList( + "Init parameters:", "legacyPropertyToString: false", + "closeIdleSessions: true", "productionMode: false", + "testParam: 42", "heartbeatInterval: 301", + "resourceCacheTime: 3601")); + + for (LabelElement label : $(LabelElement.class).all()) { + assertTrue(label.getText() + " not found", + texts.contains(label.getText())); + texts.remove(label.getText()); } + assertTrue(texts.isEmpty()); } + } |