summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-01-12 11:28:55 +0200
committerTeemu Suo-Anttila <teemusa@vaadin.com>2015-01-12 11:28:55 +0200
commit2286f9871f7f77dea6139d0cd1dfc6754b1946d5 (patch)
treec8a978d77dff74788b5a290f6c7928e39932b8a5
parent35d91245de3218283c8f4c733a3aa72ea395fb1c (diff)
parent3f27e02f121c0a39b217532afcf9530bfd2caba7 (diff)
downloadvaadin-framework-2286f9871f7f77dea6139d0cd1dfc6754b1946d5.tar.gz
vaadin-framework-2286f9871f7f77dea6139d0cd1dfc6754b1946d5.zip
Merge remote-tracking branch 'origin/master' into grid
Change-Id: Ic6b667ea6ceff43a609ce2037f656c6274871fb7
-rw-r--r--.gitignore3
-rw-r--r--WebContent/VAADIN/themes/chameleon/common/common.scss11
-rw-r--r--WebContent/VAADIN/vaadinBootstrap.js16
-rw-r--r--WebContent/release-notes.html6
-rw-r--r--client-compiler/tests/src/com/vaadin/tools/CvalCheckerTest.java23
-rw-r--r--client/src/com/vaadin/client/ApplicationConnection.java186
-rw-r--r--client/src/com/vaadin/client/VTooltip.java4
-rw-r--r--client/src/com/vaadin/client/communication/AtmospherePushConnection.java21
-rw-r--r--client/src/com/vaadin/client/componentlocator/ComponentLocator.java22
-rw-r--r--client/src/com/vaadin/client/ui/VCalendar.java30
-rw-r--r--client/src/com/vaadin/client/ui/calendar/CalendarConnector.java2
-rw-r--r--client/src/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java15
-rw-r--r--client/src/com/vaadin/client/ui/calendar/schedule/MonthEventLabel.java15
-rw-r--r--client/src/com/vaadin/client/ui/calendar/schedule/WeeklyLongEvents.java6
-rw-r--r--client/src/com/vaadin/client/ui/ui/UIConnector.java7
-rw-r--r--client/tests/src/com/vaadin/client/ApplicationConnectionURLGenerationTest.java (renamed from client/tests/src/com/vaadin/client/ApplicationConnectionTestURLGeneration.java)2
-rw-r--r--client/tests/src/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java (renamed from client/tests/src/com/vaadin/client/TestVBrowserDetailsUserAgentParser.java)2
-rw-r--r--common.xml10
-rw-r--r--gwt-files.xml5
-rwxr-xr-xscripts/format.sh28
-rw-r--r--server/ivy.xml2
-rw-r--r--server/src/com/vaadin/server/BootstrapHandler.java58
-rw-r--r--server/src/com/vaadin/server/LegacyCommunicationManager.java33
-rw-r--r--server/src/com/vaadin/server/VaadinPortletResponse.java8
-rw-r--r--server/src/com/vaadin/server/VaadinResponse.java13
-rw-r--r--server/src/com/vaadin/server/VaadinServlet.java124
-rw-r--r--server/src/com/vaadin/server/communication/UIInitHandler.java2
-rw-r--r--server/src/com/vaadin/ui/AbsoluteLayout.java2
-rw-r--r--server/src/com/vaadin/ui/Calendar.java37
-rw-r--r--server/tests/src/com/vaadin/data/fieldgroup/FieldGroupDateTest.java (renamed from server/tests/src/com/vaadin/data/fieldgroup/FieldGroupDate.java)2
-rw-r--r--server/tests/src/com/vaadin/data/util/AbstractBeanContainerTestBase.java (renamed from server/tests/src/com/vaadin/data/util/AbstractBeanContainerTest.java)6
-rw-r--r--server/tests/src/com/vaadin/data/util/AbstractContainerTestBase.java (renamed from server/tests/src/com/vaadin/data/util/AbstractContainerTest.java)2
-rw-r--r--server/tests/src/com/vaadin/data/util/AbstractHierarchicalContainerTestBase.java (renamed from server/tests/src/com/vaadin/data/util/AbstractHierarchicalContainerTest.java)4
-rw-r--r--server/tests/src/com/vaadin/data/util/AbstractInMemoryContainerTest.java6
-rw-r--r--server/tests/src/com/vaadin/data/util/AbstractInMemoryContainerTestBase.java6
-rw-r--r--server/tests/src/com/vaadin/data/util/BeanContainerTest.java4
-rw-r--r--server/tests/src/com/vaadin/data/util/BeanItemContainerGenerator.java3
-rw-r--r--server/tests/src/com/vaadin/data/util/BeanItemContainerTest.java2
-rw-r--r--server/tests/src/com/vaadin/data/util/ContainerHierarchicalWrapperTest.java (renamed from server/tests/src/com/vaadin/data/util/TestContainerHierarchicalWrapper.java)4
-rw-r--r--server/tests/src/com/vaadin/data/util/ContainerSortingTest.java (renamed from server/tests/src/com/vaadin/data/util/TestContainerSorting.java)2
-rw-r--r--server/tests/src/com/vaadin/data/util/HierarchicalContainerTest.java (renamed from server/tests/src/com/vaadin/data/util/TestHierarchicalContainer.java)4
-rw-r--r--server/tests/src/com/vaadin/data/util/IndexedContainerTest.java (renamed from server/tests/src/com/vaadin/data/util/TestIndexedContainer.java)2
-rw-r--r--server/tests/src/com/vaadin/data/util/MethodPropertyMemoryConsumptionTest.java (renamed from server/tests/src/com/vaadin/data/util/MethodPropertyMemoryConsumption.java)2
-rw-r--r--server/tests/src/com/vaadin/data/util/PerformanceTestIndexedContainerTest.java (renamed from server/tests/src/com/vaadin/data/util/PerformanceTestIndexedContainer.java)2
-rw-r--r--server/tests/src/com/vaadin/data/util/ReflectToolsGetSuperFieldTest.java (renamed from server/tests/src/com/vaadin/data/util/ReflectToolsGetSuperField.java)2
-rw-r--r--server/tests/src/com/vaadin/data/util/filter/AbstractFilterTestBase.java (renamed from server/tests/src/com/vaadin/data/util/filter/AbstractFilterTest.java)2
-rw-r--r--server/tests/src/com/vaadin/data/util/filter/AndOrFilterTest.java2
-rw-r--r--server/tests/src/com/vaadin/data/util/filter/CompareFilterTest.java2
-rw-r--r--server/tests/src/com/vaadin/data/util/filter/IsNullFilterTest.java2
-rw-r--r--server/tests/src/com/vaadin/data/util/filter/LikeFilterTest.java2
-rw-r--r--server/tests/src/com/vaadin/data/util/filter/NotFilterTest.java2
-rw-r--r--server/tests/src/com/vaadin/data/util/filter/SimpleStringFilterTest.java2
-rw-r--r--server/tests/src/com/vaadin/data/util/sqlcontainer/DataGenerator.java6
-rw-r--r--server/tests/src/com/vaadin/data/util/sqlcontainer/FreeformQueryUtil.java6
-rw-r--r--server/tests/src/com/vaadin/data/util/sqlcontainer/SQLContainerTableQueryTest.java77
-rw-r--r--server/tests/src/com/vaadin/data/util/sqlcontainer/connection/MockInitialContextFactory.java6
-rw-r--r--server/tests/src/com/vaadin/server/JSONSerializerTest.java8
-rw-r--r--server/tests/src/com/vaadin/server/VaadinGateInRequestTest.java (renamed from server/tests/src/com/vaadin/server/VaadinGateInRequestTests.java)4
-rw-r--r--server/tests/src/com/vaadin/server/VaadinHttpAndPortletRequestTestBase.java (renamed from server/tests/src/com/vaadin/server/VaadinHttpAndPortletRequestTests.java)4
-rw-r--r--server/tests/src/com/vaadin/server/VaadinLiferayRequestTest.java (renamed from server/tests/src/com/vaadin/server/VaadinLiferayRequestTests.java)4
-rw-r--r--server/tests/src/com/vaadin/server/VaadinWebSpherePortalRequestTest.java (renamed from server/tests/src/com/vaadin/server/VaadinWebSpherePortalRequestTests.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/AnyEnumToStringConverterTest.java (renamed from server/tests/src/com/vaadin/tests/data/converter/TestAnyEnumToStringConverter.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/ConverterFactoryTest.java (renamed from server/tests/src/com/vaadin/tests/data/converter/ConverterFactory.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/DateToLongConverterTest.java (renamed from server/tests/src/com/vaadin/tests/data/converter/TestDateToLongConverter.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/DateToSqlDateConverterTest.java (renamed from server/tests/src/com/vaadin/tests/data/converter/TestDateToSqlDateConverter.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/DefaultConverterFactoryTest.java (renamed from server/tests/src/com/vaadin/tests/data/converter/TestDefaultConverterFactory.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/SpecificEnumToStringConverterTest.java (renamed from server/tests/src/com/vaadin/tests/data/converter/TestSpecificEnumToStringConverter.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/StringToBigDecimalConverterTest.java (renamed from server/tests/src/com/vaadin/tests/data/converter/TestStringToBigDecimalConverter.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/StringToBigIntegerConverterTest.java (renamed from server/tests/src/com/vaadin/tests/data/converter/TestStringToBigIntegerConverter.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/StringToBooleanConverterTest.java (renamed from server/tests/src/com/vaadin/tests/data/converter/TestStringToBooleanConverter.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/StringToByteConverterTest.java (renamed from server/tests/src/com/vaadin/tests/data/converter/TestStringToByteConverter.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/StringToDateConverterTest.java (renamed from server/tests/src/com/vaadin/tests/data/converter/TestStringToDateConverter.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/StringToDoubleConverterTest.java (renamed from server/tests/src/com/vaadin/tests/data/converter/TestStringToDoubleConverter.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/StringToEnumConverterTest.java (renamed from server/tests/src/com/vaadin/tests/data/converter/TestStringToEnumConverter.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/StringToFloatConverterTest.java (renamed from server/tests/src/com/vaadin/tests/data/converter/TestStringToFloatConverter.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/StringToIntegerConverterTest.java (renamed from server/tests/src/com/vaadin/tests/data/converter/TestStringToIntegerConverter.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/StringToLongConverterTest.java (renamed from server/tests/src/com/vaadin/tests/data/converter/TestStringToLongConverter.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/StringToShortConverterTest.java (renamed from server/tests/src/com/vaadin/tests/data/converter/TestStringToShortConverter.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/validator/BigDecimalRangeValidatorTest.java (renamed from server/tests/src/com/vaadin/tests/data/validator/TestBigDecimalRangeValidator.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/validator/BigIntegerRangeValidatorTest.java (renamed from server/tests/src/com/vaadin/tests/data/validator/TestBigIntegerRangeValidator.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/validator/ByteRangeValidatorTest.java (renamed from server/tests/src/com/vaadin/tests/data/validator/TestByteRangeValidator.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/validator/CompositeValidatorTest.java (renamed from server/tests/src/com/vaadin/tests/data/validator/TestCompositeValidator.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/validator/DateRangeValidatorTest.java (renamed from server/tests/src/com/vaadin/tests/data/validator/TestDateRangeValidator.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/validator/DoubleRangeValidatorTest.java (renamed from server/tests/src/com/vaadin/tests/data/validator/TestDoubleRangeValidator.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/validator/EmailValidatorTest.java (renamed from server/tests/src/com/vaadin/tests/data/validator/TestEmailValidator.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/validator/FloatRangeValidatorTest.java (renamed from server/tests/src/com/vaadin/tests/data/validator/TestFloatRangeValidator.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/validator/IntegerRangeValidatorTest.java (renamed from server/tests/src/com/vaadin/tests/data/validator/TestIntegerRangeValidator.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/validator/LongRangeValidatorTest.java (renamed from server/tests/src/com/vaadin/tests/data/validator/TestLongRangeValidator.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/validator/NullValidatorTest.java (renamed from server/tests/src/com/vaadin/tests/data/validator/TestNullValidator.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/validator/RegexpValidatorTest.java (renamed from server/tests/src/com/vaadin/tests/data/validator/TestRegexpValidator.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/validator/ShortRangeValidatorTest.java (renamed from server/tests/src/com/vaadin/tests/data/validator/TestShortRangeValidator.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/data/validator/StringLengthValidatorTest.java (renamed from server/tests/src/com/vaadin/tests/data/validator/TestStringLengthValidator.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/InvalidLayoutTemplate.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/LayoutTemplate.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/LocaleTest.java (renamed from server/tests/src/com/vaadin/tests/design/TestLocale.java)11
-rw-r--r--server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java30
-rw-r--r--server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java229
-rw-r--r--server/tests/src/com/vaadin/tests/design/designroot/DesignWithAnnotation.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotationUI.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/MyChildDesign.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/MyChildDesignCustomComponent.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/MyDesignRoot.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/MyExtendedChildDesign.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/NestedCustomLayoutsTest.java (renamed from server/tests/src/com/vaadin/tests/design/nested/TestNestedCustomLayouts.java)58
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/ReadNestedTemplatesTest.java71
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/TestReadNestedTemplates.java62
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/WriteNestedTemplatesTest.java (renamed from server/tests/src/com/vaadin/tests/design/nested/TestWriteNestedTemplates.java)64
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAbsoluteLayout.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAccordion.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomCssLayout.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomFormLayout.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomGridLayout.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalLayout.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalSplitPanel.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomPanel.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomTabSheet.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalLayout.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalSplitPanel.java3
-rw-r--r--server/tests/src/com/vaadin/tests/server/AbstractBeanContainerListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/TestAbstractBeanContainerListeners.java)6
-rw-r--r--server/tests/src/com/vaadin/tests/server/AbstractContainerListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/TestAbstractContainerListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/AbstractInMemoryContainerListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/TestAbstractInMemoryContainerListeners.java)6
-rw-r--r--server/tests/src/com/vaadin/tests/server/AbstractPropertyListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/TestAbstractPropertyListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/AssertionsEnabledTest.java (renamed from server/tests/src/com/vaadin/tests/server/TestAssertionsEnabled.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/AtmosphereVersionTest.java (renamed from server/tests/src/com/vaadin/tests/server/TestAtmosphereVersion.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/ClassesSerializableTest.java (renamed from server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java)11
-rw-r--r--server/tests/src/com/vaadin/tests/server/ClientMethodSerializationTest.java (renamed from server/tests/src/com/vaadin/tests/server/TestClientMethodSerialization.java)9
-rw-r--r--server/tests/src/com/vaadin/tests/server/CsrfTokenMissingTest.java (renamed from server/tests/src/com/vaadin/tests/server/CsrfTokenMissingTestServer.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/EventRouterTest.java (renamed from server/tests/src/com/vaadin/tests/server/TestEventRouter.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/FileTypeResolverTest.java (renamed from server/tests/src/com/vaadin/tests/server/TestFileTypeResolver.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/IndexedContainerListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/IndexedContainerListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/KeyMapperTest.java (renamed from server/tests/src/com/vaadin/tests/server/TestKeyMapper.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/MimeTypesTest.java (renamed from server/tests/src/com/vaadin/tests/server/TestMimeTypes.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/PropertyFormatterTest.java (renamed from server/tests/src/com/vaadin/tests/server/TestPropertyFormatter.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/PropertysetItemListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/PropertysetItemListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/SerializationTest.java (renamed from server/tests/src/com/vaadin/tests/server/TestSerialization.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/SimpleMultiPartInputStreamTest.java (renamed from server/tests/src/com/vaadin/tests/server/TestSimpleMultiPartInputStream.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/StreamResourceTest.java (renamed from server/tests/src/com/vaadin/tests/server/TestStreamResource.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/StreamVariableMappingTest.java (renamed from server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/clientconnector/AttachDetachListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/clientconnector/AttachDetachListeners.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/AbstractListenerMethodsTestBase.java (renamed from server/tests/src/com/vaadin/tests/server/component/AbstractListenerMethodsTest.java)6
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/ReadEmptyDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/TestReadEmptyDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/StateGetDoesNotMarkDirtyTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/StateGetDoesNotMarkDirty.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/WriteEmptyDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/TestWriteEmptyDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/absolutelayout/ComponentPositionTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/absolutelayout/ComponentPosition.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/absolutelayout/ReadDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestReadDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/absolutelayout/WriteDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestWriteDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractcomponent/AbstractComponentStyleNamesTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestAbstractComponentStyleNames.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractcomponent/ReadDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestReadDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractcomponent/WriteDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestWriteDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractcomponentcontainer/AbstractComponentContainerListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractcomponentcontainer/TestAbstractComponentContainerListeners.java)6
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractcomponentcontainer/AddParentAsChildTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractcomponentcontainer/AddParentAsChild.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValidatorsTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValidators.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionErrorTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionError.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionsTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversions.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractfield/TestAbstractFieldListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractfield/DefaultConverterFactoryTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractfield/DefaultConverterFactory.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractfield/ReadDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractfield/TestReadDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetachTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractfield/WriteDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractfield/TestWriteDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestAbstractOrderedLayoutListeners.java)6
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/LayoutSettingsOnReplaceTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/LayoutSettingsOnReplace.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/ReadDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestReadDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/WriteDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestWriteDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractselect/AbstractSelectListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractselect/TestAbstractSelectListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/RemoveFromParentLockingTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/TestRemoveFromParentLocking.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/SetParentAsContentTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/SetParentAsContent.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestAbstractSplitPanelListeners.java)6
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/ReadDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestReadDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/WriteDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestWriteDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestAbstractTextFieldListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstracttextfield/ReadDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestReadDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstracttextfield/WriteDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestWriteDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/button/ButtonClickTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/button/ButtonClick.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/button/ButtonListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/button/ButtonListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/button/ReadDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/button/TestReadDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/button/WriteDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/button/TestWriteDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/calendar/CalendarBasicsTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/calendar/CalendarBasics.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/calendar/ContainerDataSourceTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/calendar/ContainerDataSource.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/checkbox/ReadDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/checkbox/TestReadDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/checkbox/WriteDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/checkbox/TestWriteDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/colorpicker/ColorConversionsTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/colorpicker/ColorConversions.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/csslayout/CssLayoutListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/csslayout/CssLayoutListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/csslayout/ReadDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/csslayout/TestReadDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/csslayout/WriteDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/csslayout/TestWriteDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/datefield/DateFieldListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/datefield/DateFieldListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/embedded/EmbeddedListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/embedded/EmbeddedListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBindingTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBinding.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/fieldgroup/FieldNamedDescriptionTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/fieldgroup/FieldNamedDescription.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/gridlayout/DefaultAlignmentTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/gridlayout/DefaultAlignment.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/gridlayout/GridLayoutListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/gridlayout/GridLayoutListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/label/LabelConvertersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/label/LabelConverters.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/label/LabelListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/label/LabelListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/label/ReadDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/label/TestReadDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/label/WriteDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/label/TestWriteDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/loginform/LoginFormListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/loginform/LoginFormListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/menubar/MenuBarIdsTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/menubar/MenuBarIds.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/optiongroup/OptionGroupListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/optiongroup/OptionGroupListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/orderedlayout/DefaultAlignmentTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/orderedlayout/DefaultAlignment.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/orderedlayout/OrderedLayoutTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/orderedlayout/TestOrderedLayout.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/panel/PanelListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/panel/PanelListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/panel/ReadDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/panel/TestReadDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/panel/WriteDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/panel/TestWriteDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/popupview/PopupViewListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/popupview/PopupViewListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/select/SelectListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/select/SelectListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/table/CacheUpdateExceptionCausesTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/table/CacheUpdateExceptionCauses.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/table/FooterTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/table/TestFooter.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/table/MultipleSelectionTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/table/TestMultipleSelection.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/table/TableColumnAlignmentsTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/table/TableColumnAlignments.java)14
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/table/TableGeneratorTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/table/TableGenerator.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/table/TableListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/table/TableListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/table/TablePropertyValueConverterTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/table/TablePropertyValueConverter.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/table/TableSerializationTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/table/TableSerialization.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/table/TableVisibleColumnsTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/table/TableVisibleColumns.java)12
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/tabsheet/ReadDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/tabsheet/TestReadDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/tabsheet/TabSheetListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/tabsheet/TabSheetListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/tabsheet/TabSheetTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/tabsheet/TestTabSheet.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/tabsheet/WriteDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/tabsheet/TestWriteDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/textarea/ReadDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/textarea/TestReadDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/textarea/WriteDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/textarea/TestWriteDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/textfield/ReadDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/textfield/TestReadDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldWithConverterAndValidatorTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldWithConverterAndValidator.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldWithPropertyFormatterTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldWithPropertyFormatter.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldWithValidatorTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldWithValidator.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/textfield/WriteDesignTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/textfield/TestWriteDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/tree/ListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/tree/TestListeners.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/tree/TreeListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/tree/TreeListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/treetable/EmptyTreeTableTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/treetable/EmptyTreeTable.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/treetable/TreeTableSetContainerNullTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/treetable/TreeTableSetContainerNull.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/ui/CustomUIClassLoaderTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/ui/CustomUIClassLoader.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/ui/LegacyUIAddRemoveComponentsTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/ui/LegacyUIAddRemoveComponents.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/upload/UploadListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/upload/UploadListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/window/AddRemoveSubWindowTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/window/AddRemoveSubWindow.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/window/AttachDetachWindowTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/window/AttachDetachWindow.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/window/WindowAttachTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/window/WindowAttach.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/window/WindowListenersTest.java (renamed from server/tests/src/com/vaadin/tests/server/component/window/WindowListeners.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/componentcontainer/AbstractIndexedLayoutTestBase.java (renamed from server/tests/src/com/vaadin/tests/server/componentcontainer/AbstractIndexedLayoutTest.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/componentcontainer/CssLayoutTest.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/componentcontainer/FormLayoutTest.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/componentcontainer/VerticalLayoutTest.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/components/AbstractFieldValueChangeTestBase.java (renamed from server/tests/src/com/vaadin/tests/server/components/AbstractTestFieldValueChange.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/components/ComboBoxValueChangeTest.java (renamed from server/tests/src/com/vaadin/tests/server/components/TestComboBoxValueChange.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/components/GridLayoutLastRowRemovalTest.java (renamed from server/tests/src/com/vaadin/tests/server/components/TestGridLayoutLastRowRemoval.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/components/TextFieldValueChangeTest.java (renamed from server/tests/src/com/vaadin/tests/server/components/TestTextFieldValueChange.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/components/WindowTest.java (renamed from server/tests/src/com/vaadin/tests/server/components/TestWindow.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/validation/BeanValidationTest.java (renamed from server/tests/src/com/vaadin/tests/server/validation/TestBeanValidation.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/validation/ReadOnlyValidationTest.java (renamed from server/tests/src/com/vaadin/tests/server/validation/TestReadOnlyValidation.java)2
-rw-r--r--server/tests/src/com/vaadin/ui/AbsFieldDataSourceLocaleChangeTest.java (renamed from server/tests/src/com/vaadin/ui/AbsFieldDataSourceLocaleChange.java)2
-rw-r--r--server/tests/src/com/vaadin/ui/AbsSelectTest.java (renamed from server/tests/src/com/vaadin/ui/AbstractSelectTest.java)2
-rw-r--r--server/tests/src/com/vaadin/ui/LabelDataSourceTest.java (renamed from server/tests/src/com/vaadin/ui/LabelDataSource.java)2
-rw-r--r--server/tests/src/com/vaadin/ui/UIThemeEscapingTest.java (renamed from server/tests/src/com/vaadin/ui/UIThemeEscaping.java)2
-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
-rw-r--r--shared/src/com/vaadin/shared/ui/calendar/CalendarState.java1
-rw-r--r--uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java95
-rw-r--r--uitest/src/com/vaadin/tests/accessibility/WindowWaiAriaRoles.java6
-rw-r--r--uitest/src/com/vaadin/tests/components/button/ButtonToggleIcons.java76
-rw-r--r--uitest/src/com/vaadin/tests/components/calendar/CalendarHtmlInEvents.java101
-rw-r--r--uitest/src/com/vaadin/tests/components/calendar/CalendarHtmlInEventsTest.java103
-rw-r--r--uitest/src/com/vaadin/tests/components/calendar/CalendarNotificationsTestIE.java4
-rw-r--r--uitest/src/com/vaadin/tests/components/combobox/ComboBoxValueInput.java9
-rw-r--r--uitest/src/com/vaadin/tests/components/combobox/ComboBoxValueInputTest.java5
-rw-r--r--uitest/src/com/vaadin/tests/components/combobox/ComboSelectedValueBeyondTheFirstDropdownPage.java3
-rw-r--r--uitest/src/com/vaadin/tests/components/customcomponent/CustomComponentChildVisibilityTest.java1
-rw-r--r--uitest/src/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffset.java8
-rw-r--r--uitest/src/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffsetTest.java8
-rw-r--r--uitest/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrollingTest.java9
-rw-r--r--uitest/src/com/vaadin/tests/components/popupview/PopupViewResizeWhileOpenTest.java2
-rw-r--r--uitest/src/com/vaadin/tests/components/table/LongMultiselectTest.java8
-rw-r--r--uitest/src/com/vaadin/tests/components/table/SelectAllConstantViewportTest.java3
-rw-r--r--uitest/src/com/vaadin/tests/components/table/TableClickAndDragOnIconAndComponentsTest.java25
-rw-r--r--uitest/src/com/vaadin/tests/components/table/TableColumnResizeContentsWidthTest.java14
-rwxr-xr-xuitest/src/com/vaadin/tests/components/tabsheet/ExtraScrollbarsInTabSheet.java84
-rw-r--r--uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheet.java16
-rw-r--r--uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheetTest.java5
-rw-r--r--uitest/src/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.java138
-rw-r--r--uitest/src/com/vaadin/tests/components/textfield/LocaleChangeOnReadOnlyField.java1
-rw-r--r--uitest/src/com/vaadin/tests/components/ui/UIAccessTest.java6
-rw-r--r--uitest/src/com/vaadin/tests/components/ui/UISerializationTest.java24
-rw-r--r--uitest/src/com/vaadin/tests/components/window/WindowBGColorChameleonIE8.java27
-rw-r--r--uitest/src/com/vaadin/tests/components/window/WindowBGColorChameleonIE8Test.java32
-rw-r--r--uitest/src/com/vaadin/tests/extensions/JavascriptManagerTest.java3
-rw-r--r--uitest/src/com/vaadin/tests/fieldgroup/MultipleValidationErrors.java22
-rw-r--r--uitest/src/com/vaadin/tests/fieldgroup/MultipleValidationErrorsTest.java14
-rw-r--r--uitest/src/com/vaadin/tests/minitutorials/v7a3/JSAPIUI.java3
-rw-r--r--uitest/src/com/vaadin/tests/push/SendMultibyteCharactersLongPollingTest.java3
-rw-r--r--uitest/src/com/vaadin/tests/push/SendMultibyteCharactersStreamingTest.java3
-rw-r--r--uitest/src/com/vaadin/tests/push/SendMultibyteCharactersTest.java2
-rw-r--r--uitest/src/com/vaadin/tests/push/SendMultibyteCharactersWebSocketTest.java4
-rw-r--r--uitest/src/com/vaadin/tests/requesthandlers/CommunicationError.java107
-rw-r--r--uitest/src/com/vaadin/tests/requesthandlers/CommunicationErrorTest.java41
-rw-r--r--uitest/src/com/vaadin/tests/serialization/SerializerTest.java31
-rw-r--r--uitest/src/com/vaadin/tests/serialization/SerializerTestTest.java6
-rw-r--r--uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java3
-rw-r--r--uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java19
-rw-r--r--uitest/src/com/vaadin/tests/tb3/RetryOnFail.java5
-rw-r--r--uitest/src/com/vaadin/tests/tb3/WebsocketTest.java3
-rw-r--r--uitest/src/com/vaadin/tests/themes/FaviconTest.java6
-rw-r--r--uitest/src/com/vaadin/tests/themes/chameleon/ChameleonNotification.java1
-rw-r--r--uitest/src/com/vaadin/tests/themes/chameleon/ChameleonNotificationTest.java4
-rw-r--r--uitest/src/com/vaadin/tests/themes/valo/ModalWindowTest.java6
-rw-r--r--uitest/src/com/vaadin/tests/themes/valo/TableSortIndicator.java8
-rw-r--r--uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_NextYearClickableIfRangeAcceptsFractionOfNextYear.html4
308 files changed, 1902 insertions, 1177 deletions
diff --git a/.gitignore b/.gitignore
index 11a0b3db84..1433651abc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -44,6 +44,9 @@
/WebContent/VAADIN/themes/valo/styles.css
/WebContent/VAADIN/themes/tests-valo*/styles.css
+# Persisted scss cache files
+/WebContent/VAADIN/themes/*/styles.scss.cache
+
# /WebContent/VAADIN/widgetsets/
/WebContent/VAADIN/widgetsets
/WebContent/VAADIN/gwt-unitCache*
diff --git a/WebContent/VAADIN/themes/chameleon/common/common.scss b/WebContent/VAADIN/themes/chameleon/common/common.scss
index 7bee2f529c..82e0810bc2 100644
--- a/WebContent/VAADIN/themes/chameleon/common/common.scss
+++ b/WebContent/VAADIN/themes/chameleon/common/common.scss
@@ -34,7 +34,9 @@ $chameleon-line-height: 1.4;
}
.v-sa & .v-tooltip {
- outline: 1px solid rgba(0,0,0,.2);
+ outline-color: #000000; /* Fallback for browsers that does not support RGBA such as IE8 */
+ outline-color: rgba(0,0,0,.2);
+ outline: 1px solid;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border: none;
@@ -92,6 +94,7 @@ $chameleon-line-height: 1.4;
.v-Notification,
.v-menubar-submenu {
border: 1px solid #adadad;
+ border-color: #000000; /* Fallback for browsers that does not support RGBA such as IE8 */
border-color: rgba(0,0,0,.4);
border-radius: 4px;
-webkit-border-radius: 4px;
@@ -104,8 +107,10 @@ $chameleon-line-height: 1.4;
.v-datefield-popup,
.v-contextmenu,
.v-menubar-submenu{
- background: rgba(232,232,232,.90) url(../img/grad-light-top.png) repeat-x;
- }
+ background: #e8e8e8; /* Fallback for browsers that does not support RGBA such as IE8 */
+ background: rgba(232,232,232,.90);
+ background-image: url(../img/grad-light-top.png) repeat-x;
+ }
.v-filterselect-suggestpopup,
.v-contextmenu,
.v-menubar-submenu {
diff --git a/WebContent/VAADIN/vaadinBootstrap.js b/WebContent/VAADIN/vaadinBootstrap.js
index ced077138f..53b213e110 100644
--- a/WebContent/VAADIN/vaadinBootstrap.js
+++ b/WebContent/VAADIN/vaadinBootstrap.js
@@ -18,13 +18,19 @@
log = console.log;
}
- var loadTheme = function(url) {
+ var loadTheme = function(url, version) {
if(!themesLoaded[url]) {
- log("loadTheme", url);
+ log("loadTheme", url, version);
+
+ var href = url + '/styles.css';
+ if (version) {
+ href += '?v=' + version;
+ }
+
var stylesheet = document.createElement('link');
stylesheet.setAttribute('rel', 'stylesheet');
stylesheet.setAttribute('type', 'text/css');
- stylesheet.setAttribute('href', url + "/styles.css");
+ stylesheet.setAttribute('href', href);
document.getElementsByTagName('head')[0].appendChild(stylesheet);
themesLoaded[url] = true;
}
@@ -200,8 +206,10 @@
var bootstrapApp = function(mayDefer) {
var vaadinDir = getConfig('vaadinDir');
+ var versionInfo = getConfig('versionInfo');
+
var themeUri = vaadinDir + 'themes/' + getConfig('theme');
- loadTheme(themeUri);
+ loadTheme(themeUri, versionInfo && versionInfo['vaadinVersion']);
var widgetset = getConfig('widgetset');
var widgetsetUrl = getConfig('widgetsetUrl');
diff --git a/WebContent/release-notes.html b/WebContent/release-notes.html
index a060372580..8e6385684f 100644
--- a/WebContent/release-notes.html
+++ b/WebContent/release-notes.html
@@ -112,9 +112,10 @@
<li>Declarative layout support for initializing a component hierarchy from an HTML file.</li>
<li>Uses GWT 2.7 for improved compilation times when using Super Dev Mode.</li>
<li>@Viewport annotation for declaratively defining a mobile viewport definition for a UI.</li>
- <li>Captions can be configured to be displayed as HTML.</li>
+ <li>Component captions, TabSheet/Accordion tab captions and Calendar event captions can be configured to be displayed as HTML.</li>
<li>Selects use converters when presenting itemids.</li>
- <li>Improved performance when server response contains no visual changing (e.g. empty polling responses).</li>
+ <li>Improved performance when server response contains no visual changes (e.g. empty polling responses).</li>
+ <li>Development time on-the-fly scss compilation cache may now be preserved when redeploying or restarting the server.</li>
<li>Unified JSON library for using the same API in both server-side and client-side code.</li>
<li>Range validators and converters for additional numerical types.</li>
<li>Support for fine grained add/remove item events in in-memory containers.</li>
@@ -134,6 +135,7 @@
<p>Raw JSON values passed to AbstractJavaScriptComponent.callFunction and AbstractJavaScriptExtension.callFunction should be changed to use elemental.json types.</p>
</li>
<li>The semantics of empty and required for Field classes has been made more consistent. This mainly affects Checkbox which is now considered to be empty when it is not checked.</li>
+ <li>The previously inconsistent behavior in HTML vs plain text rendering of Calendar event captions has been made consistent.</li>
<li>Support for Opera 12 has been dropped. Newer versions based on the Blink rendering engine are still supported.</li>
</ul>
<h3 id="knownissues">Known issues</h3>
diff --git a/client-compiler/tests/src/com/vaadin/tools/CvalCheckerTest.java b/client-compiler/tests/src/com/vaadin/tools/CvalCheckerTest.java
index 64a38fae2e..fb4799ae12 100644
--- a/client-compiler/tests/src/com/vaadin/tools/CvalCheckerTest.java
+++ b/client-compiler/tests/src/com/vaadin/tools/CvalCheckerTest.java
@@ -69,8 +69,8 @@ public class CvalCheckerTest {
+ "'expiredEpoch':1893511225000," + "'product':{'name':'"
+ productNameCval + "', 'version': 2}}";
- static final String responseJsonWithNullVersion = "{'licenseKey':'" + VALID_KEY + "',"
- + "'licensee':'Test User','type':'normal',"
+ static final String responseJsonWithNullVersion = "{'licenseKey':'"
+ + VALID_KEY + "'," + "'licensee':'Test User','type':'normal',"
+ "'expiredEpoch':1893511225000," + "'product':{'name':'"
+ productNameCval + "', 'version': null}}";
@@ -462,10 +462,10 @@ public class CvalCheckerTest {
out.println("5 = this-is-another-license");
out.close();
- assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(tmpLicenseFile.toURI()
- .toURL(), 3));
- assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(tmpLicenseFile.toURI()
- .toURL(), 4));
+ assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(
+ tmpLicenseFile.toURI().toURL(), 3));
+ assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(
+ tmpLicenseFile.toURI().toURL(), 4));
assertEquals("this-is-another-license", licenseChecker.readKeyFromFile(
tmpLicenseFile.toURI().toURL(), 5));
@@ -473,17 +473,18 @@ public class CvalCheckerTest {
}
@Test
- public void testReadKeyFromFile_FallbackToDefaultKeyReversed() throws Exception {
+ public void testReadKeyFromFile_FallbackToDefaultKeyReversed()
+ throws Exception {
File tmpLicenseFile = File.createTempFile("license", "lic");
PrintWriter out = new PrintWriter(tmpLicenseFile);
out.println("5 = this-is-another-license");
out.println("this-is-a-license");
out.close();
- assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(tmpLicenseFile.toURI()
- .toURL(), 3));
- assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(tmpLicenseFile.toURI()
- .toURL(), 4));
+ assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(
+ tmpLicenseFile.toURI().toURL(), 3));
+ assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(
+ tmpLicenseFile.toURI().toURL(), 4));
assertEquals("this-is-another-license", licenseChecker.readKeyFromFile(
tmpLicenseFile.toURI().toURL(), 5));
diff --git a/client/src/com/vaadin/client/ApplicationConnection.java b/client/src/com/vaadin/client/ApplicationConnection.java
index ac0656505a..aa00516feb 100644
--- a/client/src/com/vaadin/client/ApplicationConnection.java
+++ b/client/src/com/vaadin/client/ApplicationConnection.java
@@ -112,14 +112,14 @@ import elemental.json.JsonValue;
* This is the client side communication "engine", managing client-server
* communication with its server side counterpart
* com.vaadin.server.VaadinService.
- *
+ *
* Client-side connectors receive updates from the corresponding server-side
* connector (typically component) as state updates or RPC calls. The connector
* has the possibility to communicate back with its server side counter part
* through RPC calls.
- *
+ *
* TODO document better
- *
+ *
* Entry point classes (widgetsets) define <code>onModuleLoad()</code>.
*/
public class ApplicationConnection implements HasHandlers {
@@ -163,12 +163,12 @@ public class ApplicationConnection implements HasHandlers {
* A string that, if found in a non-JSON response to a UIDL request, will
* cause the browser to refresh the page. If followed by a colon, optional
* whitespace, and a URI, causes the browser to synchronously load the URI.
- *
+ *
* <p>
* This allows, for instance, a servlet filter to redirect the application
* to a custom login page when the session expires. For example:
* </p>
- *
+ *
* <pre>
* if (sessionExpired) {
* response.setHeader(&quot;Content-Type&quot;, &quot;text/html&quot;);
@@ -351,7 +351,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Event triggered when a XHR request has finished with the status code of
* the response.
- *
+ *
* Useful for handlers observing network failures like online/off-line
* monitors.
*/
@@ -407,12 +407,12 @@ public class ApplicationConnection implements HasHandlers {
/**
* Event triggered when a application is stopped by calling
* {@link ApplicationConnection#setApplicationRunning(false)}.
- *
+ *
* To listen for the event add a {@link ApplicationStoppedHandler} by
* invoking
* {@link ApplicationConnection#addHandler(ApplicationConnection.ApplicationStoppedEvent.Type, ApplicationStoppedHandler)}
* to the {@link ApplicationConnection}
- *
+ *
* @since 7.1.8
* @author Vaadin Ltd
*/
@@ -439,7 +439,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Called when a communication error has occurred. Returning
* <code>true</code> from this method suppresses error handling.
- *
+ *
* @param details
* A string describing the error.
* @param statusCode
@@ -454,7 +454,7 @@ public class ApplicationConnection implements HasHandlers {
* A listener for listening to application stopped events. The listener can
* be added to a {@link ApplicationConnection} by invoking
* {@link ApplicationConnection#addHandler(ApplicationStoppedEvent.Type, ApplicationStoppedHandler)}
- *
+ *
* @since 7.1.8
* @author Vaadin Ltd
*/
@@ -464,7 +464,7 @@ public class ApplicationConnection implements HasHandlers {
* Triggered when the {@link ApplicationConnection} marks a previously
* running application as stopped by invoking
* {@link ApplicationConnection#setApplicationRunning(false)}
- *
+ *
* @param event
* the event triggered by the {@link ApplicationConnection}
*/
@@ -567,7 +567,7 @@ public class ApplicationConnection implements HasHandlers {
* called once this application has started (first response received) or
* failed to start. This ensures that the applications are started in order,
* to avoid session-id problems.
- *
+ *
*/
public void start() {
String jsonText = configuration.getUIDL();
@@ -644,7 +644,7 @@ public class ApplicationConnection implements HasHandlers {
return componentLocator.@com.vaadin.client.componentlocator.ComponentLocator::getElementsByPathStartingAt(Ljava/lang/String;Lcom/google/gwt/dom/client/Element;)(id, element);
});
client.getPathForElement = $entry(function(element) {
- return componentLocator.@com.vaadin.client.componentlocator.ComponentLocator::getLegacyPathForElement(Lcom/google/gwt/dom/client/Element;)(element);
+ return componentLocator.@com.vaadin.client.componentlocator.ComponentLocator::getPathForElement(Lcom/google/gwt/dom/client/Element;)(element);
});
client.initializing = false;
@@ -677,7 +677,7 @@ public class ApplicationConnection implements HasHandlers {
* <li><code>vaadin.postRequestHooks</code> is a map of functions which gets
* called after each XHR made by vaadin application. Note, that it is
* attaching js functions responsibility to create the variable like this:
- *
+ *
* <code><pre>
* if(!vaadin.postRequestHooks) {vaadin.postRequestHooks = new Object();}
* postRequestHooks.myHook = function(appId) {
@@ -688,7 +688,7 @@ public class ApplicationConnection implements HasHandlers {
* </pre></code> First parameter passed to these functions is the identifier
* of Vaadin application that made the request.
* </ul>
- *
+ *
* TODO make this multi-app aware
*/
private native void initializeClientHooks()
@@ -719,7 +719,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Runs possibly registered client side post request hooks. This is expected
* to be run after each uidl request made by Vaadin application.
- *
+ *
* @param appId
*/
private static native void runPostRequestHooks(String appId)
@@ -739,7 +739,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* If on Liferay and logged in, ask the client side session management
* JavaScript to extend the session duration.
- *
+ *
* Otherwise, Liferay client side JavaScript will explicitly expire the
* session even though the server side considers the session to be active.
* See ticket #8305 for more information.
@@ -758,7 +758,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Indicates whether or not there are currently active UIDL requests. Used
* internally to sequence requests properly, seldom needed in Widgets.
- *
+ *
* @return true if there are active requests
*/
public boolean hasActiveRequest() {
@@ -778,7 +778,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Requests an analyze of layouts, to find inconsistencies. Exclusively used
* for debugging during development.
- *
+ *
* @deprecated as of 7.1. Replaced by {@link UIConnector#analyzeLayouts()}
*/
@Deprecated
@@ -790,7 +790,7 @@ public class ApplicationConnection implements HasHandlers {
* Sends a request to the server to print details to console that will help
* the developer to locate the corresponding server-side connector in the
* source code.
- *
+ *
* @param serverConnector
* @deprecated as of 7.1. Replaced by
* {@link UIConnector#showServerDebugInfo(ServerConnector)}
@@ -802,7 +802,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Makes an UIDL request to the server.
- *
+ *
* @param reqInvocations
* Data containing RPC invocations and all related information.
* @param extraParams
@@ -840,7 +840,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Sends an asynchronous or synchronous UIDL request to the server using the
* given URI.
- *
+ *
* @param uri
* The URI to use for the request. May includes GET parameters
* @param payload
@@ -1009,7 +1009,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Handles received UIDL JSON text, parsing it, and passing it on to the
* appropriate handlers, while logging timing information.
- *
+ *
* @param jsonText
* @param statusCode
*/
@@ -1037,7 +1037,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Sends an asynchronous UIDL request to the server using the given URI.
- *
+ *
* @param uri
* The URI to use for the request. May includes GET parameters
* @param payload
@@ -1172,7 +1172,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Checks whether or not the CSS is loaded. By default checks the size of
* the loading indicator element.
- *
+ *
* @return
*/
protected boolean isCSSLoaded() {
@@ -1182,12 +1182,12 @@ public class ApplicationConnection implements HasHandlers {
/**
* Shows the communication error notification.
- *
+ *
* @param details
* Optional details for debugging.
* @param statusCode
* The status code returned for the request
- *
+ *
*/
protected void showCommunicationError(String details, int statusCode) {
VConsole.error("Communication error: " + details);
@@ -1196,7 +1196,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Shows the authentication error notification.
- *
+ *
* @param details
* Optional details for debugging.
*/
@@ -1207,7 +1207,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Shows the session expiration notification.
- *
+ *
* @param details
* Optional details for debugging.
*/
@@ -1218,7 +1218,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Shows an error notification.
- *
+ *
* @param details
* Optional details for debugging.
* @param message
@@ -1231,7 +1231,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Shows the error notification.
- *
+ *
* @param details
* Optional details for debugging.
*/
@@ -1318,7 +1318,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* This method is called after applying uidl change set to application.
- *
+ *
* It will clean current and queued variable change sets. And send next
* change set if it exists.
*/
@@ -1337,7 +1337,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Cleans given queue of variable changes of such changes that came from
* components that do not exist anymore.
- *
+ *
* @param variableBurst
*/
private void cleanVariableBurst(
@@ -1386,7 +1386,7 @@ public class ApplicationConnection implements HasHandlers {
* <p>
* Used by the native "client.isActive" function.
* </p>
- *
+ *
* @return true if deferred commands are (potentially) being executed, false
* otherwise
*/
@@ -1401,7 +1401,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Returns the loading indicator used by this ApplicationConnection
- *
+ *
* @return The loading indicator for this ApplicationConnection
*/
public VLoadingIndicator getLoadingIndicator() {
@@ -1410,7 +1410,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Determines whether or not the loading indicator is showing.
- *
+ *
* @return true if the loading indicator is visible
* @deprecated As of 7.1. Use {@link #getLoadingIndicator()} and
* {@link VLoadingIndicator#isVisible()}.isVisible() instead.
@@ -1444,7 +1444,7 @@ public class ApplicationConnection implements HasHandlers {
* server is received.
* <p>
* The initial id when no request has yet been processed is -1.
- *
+ *
* @return and id identifying the response
*/
public int getLastResponseId() {
@@ -1878,13 +1878,13 @@ public class ApplicationConnection implements HasHandlers {
/**
* Sends the state change events created while updating the state
* information.
- *
+ *
* This must be called after hierarchy change listeners have been
* called. At least caption updates for the parent are strange if
* fired from state change listeners and thus calls the parent
* BEFORE the parent is aware of the child (through a
* ConnectorHierarchyChangedEvent)
- *
+ *
* @param pendingStateChangeEvents
* The events to send
*/
@@ -2240,7 +2240,7 @@ public class ApplicationConnection implements HasHandlers {
* Updates the connector hierarchy and returns a list of events that
* should be fired after update of the hierarchy and the state is
* done.
- *
+ *
* @param json
* The JSON containing the hierarchy information
* @return A collection of events that should be fired when update
@@ -2652,9 +2652,9 @@ public class ApplicationConnection implements HasHandlers {
/**
* Adds an explicit RPC method invocation to the send queue.
- *
+ *
* @since 7.0
- *
+ *
* @param invocation
* RPC method invocation
* @param delayed
@@ -2694,7 +2694,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Removes any pending invocation of the given method from the queue
- *
+ *
* @param invocation
* The invocation to remove
*/
@@ -2712,12 +2712,12 @@ public class ApplicationConnection implements HasHandlers {
/**
* This method sends currently queued variable changes to server. It is
* called when immediate variable update must happen.
- *
+ *
* To ensure correct order for variable changes (due servers multithreading
* or network), we always wait for active request to be handler before
* sending a new one. If there is an active request, we will put varible
* "burst" to queue that will be purged after current request is handled.
- *
+ *
*/
public void sendPendingVariableChanges() {
if (!deferedSendPending) {
@@ -2758,11 +2758,11 @@ public class ApplicationConnection implements HasHandlers {
/**
* Build the variable burst and send it to server.
- *
+ *
* When sync is forced, we also force sending of all pending variable-bursts
* at the same time. This is ok as we can assume that DOM will never be
* updated after this.
- *
+ *
* @param pendingInvocations
* List of RPC method invocations to send
*/
@@ -2847,7 +2847,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
* </p>
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -2869,7 +2869,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
* </p>
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -2892,7 +2892,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
* </p>
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -2915,7 +2915,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
* </p>
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -2938,7 +2938,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
* </p>
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -2961,7 +2961,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
* </p>
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -2984,7 +2984,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
* </p>
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -3007,7 +3007,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
* </p>
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -3024,13 +3024,13 @@ public class ApplicationConnection implements HasHandlers {
/**
* Sends a new value for the given paintables given variable to the server.
- *
+ *
* The update is actually queued to be sent at a suitable time. If immediate
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
- *
+ *
* A null array is sent as an empty array.
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -3047,14 +3047,14 @@ public class ApplicationConnection implements HasHandlers {
/**
* Sends a new value for the given paintables given variable to the server.
- *
+ *
* The update is actually queued to be sent at a suitable time. If immediate
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update. </p>
- *
+ *
* A null array is sent as an empty array.
- *
- *
+ *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -3071,7 +3071,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Does absolutely nothing. Replaced by {@link LayoutManager}.
- *
+ *
* @param container
* @deprecated As of 7.0, serves no purpose
*/
@@ -3093,7 +3093,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Returns false
- *
+ *
* @param paintable
* @return false, always
* @deprecated As of 7.0, serves no purpose
@@ -3105,7 +3105,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Returns false
- *
+ *
* @param paintable
* @return false, always
* @deprecated As of 7.0, serves no purpose
@@ -3126,16 +3126,16 @@ public class ApplicationConnection implements HasHandlers {
/**
* Get either an existing ComponentConnector or create a new
* ComponentConnector with the given type and id.
- *
+ *
* If a ComponentConnector with the given id already exists, returns it.
* Otherwise creates and registers a new ComponentConnector of the given
* type.
- *
+ *
* @param connectorId
* Id of the paintable
* @param connectorType
* Type of the connector, as passed from the server side
- *
+ *
* @return Either an existing ComponentConnector or a new ComponentConnector
* of the given type
*/
@@ -3148,15 +3148,15 @@ public class ApplicationConnection implements HasHandlers {
/**
* Creates a new ServerConnector with the given type and id.
- *
+ *
* Creates and registers a new ServerConnector of the given type. Should
* never be called with the connector id of an existing connector.
- *
+ *
* @param connectorId
* Id of the new connector
* @param connectorType
* Type of the connector, as passed from the server side
- *
+ *
* @return A new ServerConnector of the given type
*/
private ServerConnector createAndRegisterConnector(String connectorId,
@@ -3176,7 +3176,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets a recource that has been pre-loaded via UIDL, such as custom
* layouts.
- *
+ *
* @param name
* identifier of the resource to get
* @return the resource
@@ -3187,7 +3187,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Singleton method to get instance of app's context menu.
- *
+ *
* @return VContextMenu object
*/
public VContextMenu getContextMenu() {
@@ -3202,7 +3202,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets an {@link Icon} instance corresponding to a URI.
- *
+ *
* @since 7.2
* @param uri
* @return Icon object
@@ -3224,7 +3224,7 @@ public class ApplicationConnection implements HasHandlers {
* Translates custom protocols in UIDL URI's to be recognizable by browser.
* All uri's from UIDL should be routed via this method before giving them
* to browser due URI's in UIDL may contain custom protocols like theme://.
- *
+ *
* @param uidlUri
* Vaadin URI from uidl
* @return translated URI ready for browser
@@ -3296,7 +3296,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the URI for the current theme. Can be used to reference theme
* resources.
- *
+ *
* @return URI to the current theme
*/
public String getThemeUri() {
@@ -3307,7 +3307,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Listens for Notification hide event, and redirects. Used for system
* messages, such as session expired.
- *
+ *
*/
private class NotificationRedirect implements VNotification.EventListener {
String url;
@@ -3336,7 +3336,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the token (aka double submit cookie) that the server uses to protect
* against Cross Site Request Forgery attacks.
- *
+ *
* @return the CSRF token string
*/
public String getCsrfToken() {
@@ -3346,7 +3346,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Use to notify that the given component's caption has changed; layouts may
* have to be recalculated.
- *
+ *
* @param component
* the Paintable whose caption has changed
* @deprecated As of 7.0.2, has not had any effect for a long time
@@ -3358,7 +3358,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the main view
- *
+ *
* @return the main view
*/
public UIConnector getUIConnector() {
@@ -3367,7 +3367,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the {@link ApplicationConfiguration} for the current application.
- *
+ *
* @see ApplicationConfiguration
* @return the configuration for this application
*/
@@ -3380,7 +3380,7 @@ public class ApplicationConnection implements HasHandlers {
* list of events which has server side listeners is updated automatically
* before the component is updated so the value is correct if called from
* updatedFromUIDL.
- *
+ *
* @param paintable
* The connector to register event listeners for
* @param eventIdentifier
@@ -3400,7 +3400,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Adds the get parameters to the uri and returns the new uri that contains
* the parameters.
- *
+ *
* @param uri
* The uri to which the parameters should be added.
* @param extraParams
@@ -3453,7 +3453,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Get VTooltip instance related to application connection
- *
+ *
* @return VTooltip instance
*/
public VTooltip getVTooltip() {
@@ -3465,7 +3465,7 @@ public class ApplicationConnection implements HasHandlers {
* this method is now handled by the state change event handler in
* AbstractComponentConnector. The only function this method has is to
* return true if the UIDL is a "cached" update.
- *
+ *
* @param component
* @param uidl
* @param manageCaption
@@ -3516,7 +3516,7 @@ public class ApplicationConnection implements HasHandlers {
* Schedules a heartbeat request to occur after the configured heartbeat
* interval elapses if the interval is a positive number. Otherwise, does
* nothing.
- *
+ *
* @deprecated as of 7.2, use {@link Heartbeat#schedule()} instead
*/
@Deprecated
@@ -3530,7 +3530,7 @@ public class ApplicationConnection implements HasHandlers {
* Heartbeat requests are used to inform the server that the client-side is
* still alive. If the client page is closed or the connection lost, the
* server will eventually close the inactive UI.
- *
+ *
* @deprecated as of 7.2, use {@link Heartbeat#send()} instead
*/
@Deprecated
@@ -3554,7 +3554,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* This method can be used to postpone rendering of a response for a short
* period of time (e.g. to avoid the rendering process during animation).
- *
+ *
* @param lock
*/
public void suspendReponseHandling(Object lock) {
@@ -3563,7 +3563,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Resumes the rendering process once all locks have been removed.
- *
+ *
* @param lock
*/
public void resumeResponseHandling(Object lock) {
@@ -3608,7 +3608,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Sets the delegate that is called whenever a communication error occurrs.
- *
+ *
* @param delegate
* the delegate.
*/
@@ -3651,7 +3651,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the active connector for focused element in browser.
- *
+ *
* @return Connector for focused element or null.
*/
private ComponentConnector getActiveConnector() {
@@ -3665,7 +3665,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Sets the status for the push connection.
- *
+ *
* @param enabled
* <code>true</code> to enable the push connection;
* <code>false</code> to disable the push connection.
@@ -3715,7 +3715,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Returns a human readable string representation of the method used to
* communicate with the server.
- *
+ *
* @since 7.1
* @return A string representation of the current transport type
*/
diff --git a/client/src/com/vaadin/client/VTooltip.java b/client/src/com/vaadin/client/VTooltip.java
index 47a1b71228..453563370c 100644
--- a/client/src/com/vaadin/client/VTooltip.java
+++ b/client/src/com/vaadin/client/VTooltip.java
@@ -134,11 +134,11 @@ public class VTooltip extends VOverlay {
description.setInnerHTML(info.getTitle());
/*
* Issue #11871: to correctly update the offsetWidth of description
- * element we need to clear style width of it's parent DIV from old
+ * element we need to clear style width of its parent DIV from old
* value (in some strange cases this width=[tooltip MAX_WIDTH] after
* tooltip text has been already updated to new shortly value:
*
- * <div class="popupContent"> <div style="width: 500px;"> <div
+ * <div class="popupContent"> <div style="width:500px;"> <div
* class="v-errormessage" aria-hidden="true" style="display: none;">
* <div class="gwt-HTML"> </div> </div> <div
* class="v-tooltip-text">This is a short tooltip</div> </div>
diff --git a/client/src/com/vaadin/client/communication/AtmospherePushConnection.java b/client/src/com/vaadin/client/communication/AtmospherePushConnection.java
index 628933fd86..dc8d497a69 100644
--- a/client/src/com/vaadin/client/communication/AtmospherePushConnection.java
+++ b/client/src/com/vaadin/client/communication/AtmospherePushConnection.java
@@ -30,6 +30,7 @@ import com.vaadin.client.ResourceLoader.ResourceLoadEvent;
import com.vaadin.client.ResourceLoader.ResourceLoadListener;
import com.vaadin.client.VConsole;
import com.vaadin.shared.ApplicationConstants;
+import com.vaadin.shared.Version;
import com.vaadin.shared.communication.PushConstants;
import com.vaadin.shared.ui.ui.UIConstants;
import com.vaadin.shared.ui.ui.UIState.PushConfigurationState;
@@ -514,16 +515,10 @@ public class AtmospherePushConnection implements PushConnection {
}-*/;
private void runWhenAtmosphereLoaded(final Command command) {
-
if (isAtmosphereLoaded()) {
command.execute();
} else {
- final String pushJs;
- if (ApplicationConfiguration.isProductionMode()) {
- pushJs = ApplicationConstants.VAADIN_PUSH_JS;
- } else {
- pushJs = ApplicationConstants.VAADIN_PUSH_DEBUG_JS;
- }
+ final String pushJs = getVersionedPushJs();
VConsole.log("Loading " + pushJs);
ResourceLoader.get().loadScript(
@@ -553,6 +548,18 @@ public class AtmospherePushConnection implements PushConnection {
}
}
+ private String getVersionedPushJs() {
+ String pushJs;
+ if (ApplicationConfiguration.isProductionMode()) {
+ pushJs = ApplicationConstants.VAADIN_PUSH_JS;
+ } else {
+ pushJs = ApplicationConstants.VAADIN_PUSH_DEBUG_JS;
+ }
+ // Parameter appended to bypass caches after version upgrade.
+ pushJs += "?v=" + Version.getFullVersion();
+ return pushJs;
+ }
+
/*
* (non-Javadoc)
*
diff --git a/client/src/com/vaadin/client/componentlocator/ComponentLocator.java b/client/src/com/vaadin/client/componentlocator/ComponentLocator.java
index feb1c91767..0dfaf99cc1 100644
--- a/client/src/com/vaadin/client/componentlocator/ComponentLocator.java
+++ b/client/src/com/vaadin/client/componentlocator/ComponentLocator.java
@@ -36,7 +36,6 @@ import com.vaadin.client.ApplicationConnection;
public class ComponentLocator {
private final List<LocatorStrategy> locatorStrategies;
- private final LocatorStrategy legacyLocatorStrategy;
/**
* Reference to ApplicationConnection instance.
@@ -52,9 +51,8 @@ public class ComponentLocator {
*/
public ComponentLocator(ApplicationConnection client) {
this.client = client;
- legacyLocatorStrategy = new LegacyLocatorStrategy(client);
locatorStrategies = Arrays.asList(new VaadinFinderLocatorStrategy(
- client), legacyLocatorStrategy);
+ client), new LegacyLocatorStrategy(client));
}
/**
@@ -115,24 +113,6 @@ public class ComponentLocator {
}
/**
- * Returns a String locator which uniquely identifies the target element.
- * The returned locator is in a legacy format that is suitable for Vaadin
- * TestBench Recorder. For non-legacy format, use
- * {@link #getPathForElement(com.google.gwt.user.client.Element)} instead.
- *
- *
- * @since 7.4
- * @param targetElement
- * The element to generate a path for.
- * @return A String locator that identifies the target element or null if a
- * String locator could not be created.
- */
- public String getLegacyPathForElement(Element targetElement) {
- return legacyLocatorStrategy
- .getPathForElement(DOM.asOld(targetElement));
- }
-
- /**
* Locates an element using a String locator (path) which identifies a DOM
* element. The {@link #getPathForElement(Element)} method can be used for
* the inverse operation, i.e. generating a string expression for a DOM
diff --git a/client/src/com/vaadin/client/ui/VCalendar.java b/client/src/com/vaadin/client/ui/VCalendar.java
index c59a78108c..08d4351931 100644
--- a/client/src/com/vaadin/client/ui/VCalendar.java
+++ b/client/src/com/vaadin/client/ui/VCalendar.java
@@ -1342,6 +1342,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
private MouseEventListener mouseEventListener;
private boolean forwardNavigationEnabled = true;
private boolean backwardNavigationEnabled = true;
+ private boolean eventCaptionAsHtml = false;
/**
* Get the listener that listen to mouse events
@@ -1467,4 +1468,33 @@ public class VCalendar extends Composite implements VHasDropHandler {
public void setDropHandler(CalendarDropHandler dropHandler) {
this.dropHandler = dropHandler;
}
+
+ /**
+ * Sets whether the event captions are rendered as HTML.
+ * <p>
+ * If set to true, the captions are rendered in the browser as HTML and the
+ * developer is responsible for ensuring no harmful HTML is used. If set to
+ * false, the caption is rendered in the browser as plain text.
+ * <p>
+ * The default is false, i.e. to render that caption as plain text.
+ *
+ * @param captionAsHtml
+ * true if the captions are rendered as HTML, false if rendered
+ * as plain text
+ */
+ public void setEventCaptionAsHtml(boolean eventCaptionAsHtml) {
+ this.eventCaptionAsHtml = eventCaptionAsHtml;
+ }
+
+ /**
+ * Checks whether event captions are rendered as HTML
+ * <p>
+ * The default is false, i.e. to render that caption as plain text.
+ *
+ * @return true if the captions are rendered as HTML, false if rendered as
+ * plain text
+ */
+ public boolean isEventCaptionAsHtml() {
+ return eventCaptionAsHtml;
+ }
}
diff --git a/client/src/com/vaadin/client/ui/calendar/CalendarConnector.java b/client/src/com/vaadin/client/ui/calendar/CalendarConnector.java
index 5a0ec3d2ec..e9bbf2015c 100644
--- a/client/src/com/vaadin/client/ui/calendar/CalendarConnector.java
+++ b/client/src/com/vaadin/client/ui/calendar/CalendarConnector.java
@@ -345,6 +345,8 @@ public class CalendarConnector extends AbstractComponentConnector implements
widget.setEventMoveAllowed(hasEventListener(CalendarEventId.EVENTMOVE));
widget.setEventResizeAllowed(hasEventListener(CalendarEventId.EVENTRESIZE));
+ widget.setEventCaptionAsHtml(state.eventCaptionAsHtml);
+
List<CalendarState.Day> days = state.days;
List<CalendarState.Event> events = state.events;
diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java b/client/src/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java
index abc9419049..1a54fe0454 100644
--- a/client/src/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java
+++ b/client/src/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java
@@ -184,15 +184,20 @@ public class DateCellDayEvent extends FocusableHTML implements
*/
private void updateCaptions(boolean bigMode) {
String innerHtml;
- String escapedCaption = WidgetUtil.escapeHTML(calendarEvent
- .getCaption());
String timeAsText = calendarEvent.getTimeAsText();
+ String htmlOrText;
+
+ if (dateCell.weekgrid.getCalendar().isEventCaptionAsHtml()) {
+ htmlOrText = calendarEvent.getCaption();
+ } else {
+ htmlOrText = WidgetUtil.escapeHTML(calendarEvent.getCaption());
+ }
+
if (bigMode) {
- innerHtml = "<span>" + timeAsText + "</span><br />"
- + escapedCaption;
+ innerHtml = "<span>" + timeAsText + "</span><br />" + htmlOrText;
} else {
innerHtml = "<span>" + timeAsText + "<span>:</span></span> "
- + escapedCaption;
+ + htmlOrText;
}
caption.setInnerHTML(innerHtml);
eventContent.setInnerHTML("");
diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/MonthEventLabel.java b/client/src/com/vaadin/client/ui/calendar/schedule/MonthEventLabel.java
index 6fc2e430cd..31e600c8f9 100644
--- a/client/src/com/vaadin/client/ui/calendar/schedule/MonthEventLabel.java
+++ b/client/src/com/vaadin/client/ui/calendar/schedule/MonthEventLabel.java
@@ -20,6 +20,7 @@ import java.util.Date;
import com.google.gwt.event.dom.client.ContextMenuEvent;
import com.google.gwt.event.dom.client.ContextMenuHandler;
import com.google.gwt.user.client.ui.HTML;
+import com.vaadin.client.Util;
import com.vaadin.client.ui.VCalendar;
/**
@@ -75,7 +76,8 @@ public class MonthEventLabel extends HTML implements HasTooltipKey {
* Set the caption of the event label
*
* @param caption
- * The caption string, can be HTML
+ * The caption string, can be HTML if
+ * {@link VCalendar#isEventCaptionAsHtml()} is true
*/
public void setCaption(String caption) {
this.caption = caption;
@@ -87,13 +89,20 @@ public class MonthEventLabel extends HTML implements HasTooltipKey {
*/
private void renderCaption() {
StringBuilder html = new StringBuilder();
+ String textOrHtml;
+ if (calendar.isEventCaptionAsHtml()) {
+ textOrHtml = caption;
+ } else {
+ textOrHtml = Util.escapeHTML(caption);
+ }
+
if (caption != null && time != null) {
html.append("<span class=\"" + STYLENAME + "-time\">");
html.append(calendar.getTimeFormat().format(time));
html.append("</span> ");
- html.append(caption);
+ html.append(textOrHtml);
} else if (caption != null) {
- html.append(caption);
+ html.append(textOrHtml);
} else if (time != null) {
html.append("<span class=\"" + STYLENAME + "-time\">");
html.append(calendar.getTimeFormat().format(time));
diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/WeeklyLongEvents.java b/client/src/com/vaadin/client/ui/calendar/schedule/WeeklyLongEvents.java
index bd833e06a0..9488c8835a 100644
--- a/client/src/com/vaadin/client/ui/calendar/schedule/WeeklyLongEvents.java
+++ b/client/src/com/vaadin/client/ui/calendar/schedule/WeeklyLongEvents.java
@@ -102,7 +102,11 @@ public class WeeklyLongEvents extends HorizontalPanel implements HasTooltipKey {
eventLabel.addStyleDependentName(extraStyle + "-all-day");
}
if (!started) {
- eventLabel.setText(calendarEvent.getCaption());
+ if (calendar.isEventCaptionAsHtml()) {
+ eventLabel.setHTML(calendarEvent.getCaption());
+ } else {
+ eventLabel.setText(calendarEvent.getCaption());
+ }
started = true;
}
}
diff --git a/client/src/com/vaadin/client/ui/ui/UIConnector.java b/client/src/com/vaadin/client/ui/ui/UIConnector.java
index d6f14bf158..9e1da113bf 100644
--- a/client/src/com/vaadin/client/ui/ui/UIConnector.java
+++ b/client/src/com/vaadin/client/ui/ui/UIConnector.java
@@ -76,6 +76,7 @@ import com.vaadin.client.ui.window.WindowConnector;
import com.vaadin.server.Page.Styles;
import com.vaadin.shared.ApplicationConstants;
import com.vaadin.shared.MouseEventDetails;
+import com.vaadin.shared.Version;
import com.vaadin.shared.communication.MethodInvocation;
import com.vaadin.shared.ui.ComponentStateUtil;
import com.vaadin.shared.ui.Connect;
@@ -1014,9 +1015,13 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
* @return The URL the theme can be loaded from
*/
private String getThemeUrl(String theme) {
- return getConnection().translateVaadinUri(
+ String themeUrl = getConnection().translateVaadinUri(
ApplicationConstants.VAADIN_PROTOCOL_PREFIX + "themes/" + theme
+ "/styles" + ".css");
+ // Parameter appended to bypass caches after version upgrade.
+ themeUrl += "?v=" + Version.getFullVersion();
+ return themeUrl;
+
}
/**
diff --git a/client/tests/src/com/vaadin/client/ApplicationConnectionTestURLGeneration.java b/client/tests/src/com/vaadin/client/ApplicationConnectionURLGenerationTest.java
index cb4f1f4068..36baa163cb 100644
--- a/client/tests/src/com/vaadin/client/ApplicationConnectionTestURLGeneration.java
+++ b/client/tests/src/com/vaadin/client/ApplicationConnectionURLGenerationTest.java
@@ -4,7 +4,7 @@ import static org.junit.Assert.assertEquals;
import org.junit.Test;
-public class ApplicationConnectionTestURLGeneration {
+public class ApplicationConnectionURLGenerationTest {
private static final String[] URIS = new String[] {
"http://demo.vaadin.com/", //
diff --git a/client/tests/src/com/vaadin/client/TestVBrowserDetailsUserAgentParser.java b/client/tests/src/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java
index cb70fc7a39..62b727e5f5 100644
--- a/client/tests/src/com/vaadin/client/TestVBrowserDetailsUserAgentParser.java
+++ b/client/tests/src/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java
@@ -6,7 +6,7 @@ import org.junit.Assert;
import com.vaadin.shared.VBrowserDetails;
-public class TestVBrowserDetailsUserAgentParser extends TestCase {
+public class VBrowserDetailsUserAgentParserTest extends TestCase {
private static final String FIREFOX30_WINDOWS = "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6";
private static final String FIREFOX30_LINUX = "Mozilla/5.0 (X11; U; Linux x86_64; es-ES; rv:1.9.0.12) Gecko/2009070811 Ubuntu/9.04 (jaunty) Firefox/3.0.12";
diff --git a/common.xml b/common.xml
index d5142a5b9f..4f7d0e4f62 100644
--- a/common.xml
+++ b/common.xml
@@ -353,14 +353,8 @@
<batchtest fork="yes" todir="${report.dir}">
<fileset dir="${test.src}">
- <exclude name="**/Abstract*" />
- <exclude name="**/Mock*" />
- <exclude name="com/vaadin/tests/data/bean/*" />
- <exclude name="com/vaadin/tests/util/*" />
- <exclude name="com/vaadin/benchmarks/*" />
- <exclude name="**/VaadinClasses.java" />
- <exclude name="**/*TestRunner.java" />
- <exclude name="**/SQLTestsConstants.java" />
+ <include name="**/*Test.java" />
+ <include name="**/*Tests.java" />
</fileset>
</batchtest>
</junit>
diff --git a/gwt-files.xml b/gwt-files.xml
index 26126a7ffb..fd31482bdc 100644
--- a/gwt-files.xml
+++ b/gwt-files.xml
@@ -185,10 +185,5 @@
<!-- Server files from gwt-user -->
<include name="com/google/gwt/*/server/**" />
</fileset>
- <!-- GWT Elemental -->
- <fileset dir="${gwt.elemental.jar.files}">
- <exclude name="META-INF/**" />
- <exclude name="super/**" />
- </fileset>
</union>
</project>
diff --git a/scripts/format.sh b/scripts/format.sh
new file mode 100755
index 0000000000..540a35627c
--- /dev/null
+++ b/scripts/format.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+# Find eclipse binary
+if [ "$ECLIPSE" = "" ]
+then
+ ECLIPSE=`which eclipse`
+fi
+
+if [ "$ECLIPSE" = "" ]
+then
+ echo "Could not find 'eclipse' in PATH"
+ echo "Either add it to the PATH or set the ECLIPSE variable to point to the Eclipse binary"
+ echo "e.g. ECLIPSE=\"/some/where/eclipse\" $0"
+ exit 1
+fi
+
+# Resolve project root directory
+basedir=`dirname $0`/..
+pushd "$basedir" > /dev/null
+basedir=`pwd`
+popd > /dev/null
+
+SRC=`ls -d $basedir/*/src $basedir/*/tests/src`
+
+# Use project formatting settings
+config="$basedir/.settings/org.eclipse.jdt.core.prefs"
+
+"$ECLIPSE" -nosplash -application org.eclipse.jdt.core.JavaCodeFormatter -config "$config" $SRC
diff --git a/server/ivy.xml b/server/ivy.xml
index 2901be8090..b30e6a72ef 100644
--- a/server/ivy.xml
+++ b/server/ivy.xml
@@ -70,6 +70,8 @@
conf="test,ide -> default" />
<dependency org="org.mockito" name="mockito-all" rev="1.9.5"
conf="test,ide->default" />
+ <dependency org="org.hamcrest" name="hamcrest-all" rev="1.3"
+ conf="test,ide->default" />
<dependency org="org.easymock" name="easymock" rev="3.0"
conf="test,ide-> default" transitive="true" />
<dependency org="org.hsqldb" name="hsqldb" rev="2.2.6"
diff --git a/server/src/com/vaadin/server/BootstrapHandler.java b/server/src/com/vaadin/server/BootstrapHandler.java
index bfe195ccf9..c45e2b70e0 100644
--- a/server/src/com/vaadin/server/BootstrapHandler.java
+++ b/server/src/com/vaadin/server/BootstrapHandler.java
@@ -414,6 +414,9 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
String vaadinLocation = vaadinService.getStaticFileLocation(request)
+ "/VAADIN/";
+ // Parameter appended to JS to bypass caches after version upgrade.
+ String versionQueryParam = "?v=" + Version.getFullVersion();
+
if (context.getPushMode().isEnabled()) {
// Load client-side dependencies for push support
String pushJS = vaadinLocation;
@@ -424,12 +427,14 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
pushJS += ApplicationConstants.VAADIN_PUSH_DEBUG_JS;
}
+ pushJS += versionQueryParam;
+
fragmentNodes.add(new Element(Tag.valueOf("script"), "").attr(
"type", "text/javascript").attr("src", pushJS));
}
String bootstrapLocation = vaadinLocation
- + ApplicationConstants.VAADIN_BOOTSTRAP_JS;
+ + ApplicationConstants.VAADIN_BOOTSTRAP_JS + versionQueryParam;
fragmentNodes.add(new Element(Tag.valueOf("script"), "").attr("type",
"text/javascript").attr("src", bootstrapLocation));
Element mainScriptTag = new Element(Tag.valueOf("script"), "").attr(
@@ -513,7 +518,6 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
}
appConfig.put("versionInfo", versionInfo);
-
appConfig.put("widgetset", context.getWidgetsetName());
// Use locale from session if set, else from the request
@@ -525,42 +529,32 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
if (systemMessages != null) {
// Write the CommunicationError -message to client
JsonObject comErrMsg = Json.createObject();
- comErrMsg.put("caption",
+ putValueOrNull(comErrMsg, "caption",
systemMessages.getCommunicationErrorCaption());
- comErrMsg.put("message",
+ putValueOrNull(comErrMsg, "message",
systemMessages.getCommunicationErrorMessage());
- if (systemMessages.getCommunicationErrorURL() == null) {
- comErrMsg.put("url", Json.createNull());
- } else {
- comErrMsg.put("url", systemMessages.getCommunicationErrorURL());
- }
+ putValueOrNull(comErrMsg, "url",
+ systemMessages.getCommunicationErrorURL());
appConfig.put("comErrMsg", comErrMsg);
JsonObject authErrMsg = Json.createObject();
- authErrMsg.put("caption",
+ putValueOrNull(authErrMsg, "caption",
systemMessages.getAuthenticationErrorCaption());
- authErrMsg.put("message",
+ putValueOrNull(authErrMsg, "message",
systemMessages.getAuthenticationErrorMessage());
- if (systemMessages.getAuthenticationErrorURL() == null) {
- authErrMsg.put("url", Json.createNull());
- } else {
- authErrMsg.put("url",
- systemMessages.getAuthenticationErrorURL());
- }
+ putValueOrNull(authErrMsg, "url",
+ systemMessages.getAuthenticationErrorURL());
appConfig.put("authErrMsg", authErrMsg);
JsonObject sessExpMsg = Json.createObject();
- sessExpMsg
- .put("caption", systemMessages.getSessionExpiredCaption());
- sessExpMsg
- .put("message", systemMessages.getSessionExpiredMessage());
- if (systemMessages.getSessionExpiredURL() == null) {
- sessExpMsg.put("url", Json.createNull());
- } else {
- sessExpMsg.put("url", systemMessages.getSessionExpiredURL());
- }
+ putValueOrNull(sessExpMsg, "caption",
+ systemMessages.getSessionExpiredCaption());
+ putValueOrNull(sessExpMsg, "message",
+ systemMessages.getSessionExpiredMessage());
+ putValueOrNull(sessExpMsg, "url",
+ systemMessages.getSessionExpiredURL());
appConfig.put("sessExpMsg", sessExpMsg);
}
@@ -624,7 +618,7 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
}
/**
- * Don not override.
+ * Do not override.
*
* @param context
* @return
@@ -648,4 +642,14 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
e.getLocalizedMessage());
}
+
+ private void putValueOrNull(JsonObject object, String key, String value) {
+ assert object != null;
+ assert key != null;
+ if (value == null) {
+ object.put(key, Json.createNull());
+ } else {
+ object.put(key, value);
+ }
+ }
}
diff --git a/server/src/com/vaadin/server/LegacyCommunicationManager.java b/server/src/com/vaadin/server/LegacyCommunicationManager.java
index 485084b515..fda5ad444f 100644
--- a/server/src/com/vaadin/server/LegacyCommunicationManager.java
+++ b/server/src/com/vaadin/server/LegacyCommunicationManager.java
@@ -24,6 +24,7 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -81,6 +82,8 @@ public class LegacyCommunicationManager implements Serializable {
return session;
}
+ private static final ConcurrentHashMap<Class<? extends SharedState>, JsonValue> referenceDiffStates = new ConcurrentHashMap<Class<? extends SharedState>, JsonValue>();
+
/**
* @deprecated As of 7.1. See #11411.
*/
@@ -96,17 +99,10 @@ public class LegacyCommunicationManager implements Serializable {
if (diffState == null && supportsDiffState) {
// Use an empty state object as reference for full
// repaints
-
- try {
- SharedState referenceState = stateType.newInstance();
- EncodeResult encodeResult = JsonCodec.encode(referenceState,
- null, stateType, uI.getConnectorTracker());
- diffState = encodeResult.getEncodedValue();
- } catch (Exception e) {
- getLogger()
- .log(Level.WARNING,
- "Error creating reference object for state of type {0}",
- stateType.getName());
+ diffState = referenceDiffStates.get(stateType);
+ if (diffState == null) {
+ diffState = createReferenceDiffStateState(stateType);
+ referenceDiffStates.put(stateType, diffState);
}
}
EncodeResult encodeResult = JsonCodec.encode(state, diffState,
@@ -118,6 +114,21 @@ public class LegacyCommunicationManager implements Serializable {
return (JsonObject) encodeResult.getDiff();
}
+ private static JsonValue createReferenceDiffStateState(
+ Class<? extends SharedState> stateType) {
+ try {
+ SharedState referenceState = stateType.newInstance();
+ EncodeResult encodeResult = JsonCodec.encode(referenceState, null,
+ stateType, null);
+ return encodeResult.getEncodedValue();
+ } catch (Exception e) {
+ getLogger().log(Level.WARNING,
+ "Error creating reference object for state of type {0}",
+ stateType.getName());
+ return null;
+ }
+ }
+
/**
* Resolves a dependency URI, registering the URI with this
* {@code LegacyCommunicationManager} if needed and returns a fully
diff --git a/server/src/com/vaadin/server/VaadinPortletResponse.java b/server/src/com/vaadin/server/VaadinPortletResponse.java
index d9f133ac8a..2b6e0c75fb 100644
--- a/server/src/com/vaadin/server/VaadinPortletResponse.java
+++ b/server/src/com/vaadin/server/VaadinPortletResponse.java
@@ -97,6 +97,14 @@ public class VaadinPortletResponse implements VaadinResponse {
}
@Override
+ public void setContentLength(int len) {
+ if (response instanceof ResourceResponse) {
+ ((ResourceResponse) response).setContentLength(len);
+ }
+
+ }
+
+ @Override
public PrintWriter getWriter() throws IOException {
if (response instanceof MimeResponse) {
return ((MimeResponse) response).getWriter();
diff --git a/server/src/com/vaadin/server/VaadinResponse.java b/server/src/com/vaadin/server/VaadinResponse.java
index 1d5fcf141f..c31c6c05d8 100644
--- a/server/src/com/vaadin/server/VaadinResponse.java
+++ b/server/src/com/vaadin/server/VaadinResponse.java
@@ -169,4 +169,17 @@ public interface VaadinResponse extends Serializable {
* @see PortletResponse#addProperty(Cookie)
*/
public void addCookie(Cookie cookie);
+
+ /**
+ * Sets the length of the content body in the response In HTTP servlets,
+ * this method sets the HTTP Content-Length header. For some portlet
+ * responses, this method sets the content-length header, for others this
+ * method does nothing.
+ *
+ * @param len
+ * an integer specifying the length of the content being returned
+ * to the client
+ * @since 7.3.8
+ */
+ public void setContentLength(int len);
}
diff --git a/server/src/com/vaadin/server/VaadinServlet.java b/server/src/com/vaadin/server/VaadinServlet.java
index d1242676da..aa76dc8e08 100644
--- a/server/src/com/vaadin/server/VaadinServlet.java
+++ b/server/src/com/vaadin/server/VaadinServlet.java
@@ -28,6 +28,7 @@ import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Enumeration;
@@ -45,14 +46,21 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import com.google.gwt.thirdparty.guava.common.base.Charsets;
+import com.google.gwt.thirdparty.guava.common.io.Files;
import com.vaadin.annotations.VaadinServletConfiguration;
import com.vaadin.annotations.VaadinServletConfiguration.InitParameterName;
import com.vaadin.sass.internal.ScssStylesheet;
import com.vaadin.server.communication.ServletUIInitHandler;
import com.vaadin.shared.JsonConstants;
+import com.vaadin.shared.Version;
import com.vaadin.ui.UI;
import com.vaadin.util.CurrentInstance;
+import elemental.json.Json;
+import elemental.json.JsonArray;
+import elemental.json.JsonObject;
+
@SuppressWarnings("serial")
public class VaadinServlet extends HttpServlet implements Constants {
@@ -61,14 +69,47 @@ public class VaadinServlet extends HttpServlet implements Constants {
private final String css;
private final List<String> sourceUris;
private final long timestamp;
+ private final String scssFileName;
- public ScssCacheEntry(String css, List<String> sourceUris) {
+ public ScssCacheEntry(String scssFileName, String css,
+ List<String> sourceUris) {
+ this.scssFileName = scssFileName;
this.css = css;
this.sourceUris = sourceUris;
timestamp = getLastModified();
}
+ public ScssCacheEntry(JsonObject json) {
+ css = json.getString("css");
+ timestamp = Long.parseLong(json.getString("timestamp"));
+
+ sourceUris = new ArrayList<String>();
+
+ JsonArray uris = json.getArray("uris");
+ for (int i = 0; i < uris.length(); i++) {
+ sourceUris.add(uris.getString(i));
+ }
+
+ // Not set for cache entries read from disk
+ scssFileName = null;
+ }
+
+ public String asJson() {
+ JsonArray uris = Json.createArray();
+ for (String uri : sourceUris) {
+ uris.set(uris.length(), uri);
+ }
+
+ JsonObject object = Json.createObject();
+ object.put("version", Version.getFullVersion());
+ object.put("timestamp", Long.toString(timestamp));
+ object.put("uris", uris);
+ object.put("css", css);
+
+ return object.toJson();
+ }
+
public String getCss() {
return css;
}
@@ -117,6 +158,10 @@ public class VaadinServlet extends HttpServlet implements Constants {
}
}
+ public String getScssFileName() {
+ return scssFileName;
+ }
+
}
private VaadinServletService servletService;
@@ -612,7 +657,14 @@ public class VaadinServlet extends HttpServlet implements Constants {
* Global cache of scss compilation results. This map is protected from
* concurrent access by {@link #SCSS_MUTEX}.
*/
- private static final Map<String, ScssCacheEntry> scssCache = new HashMap<String, ScssCacheEntry>();
+ private final Map<String, ScssCacheEntry> scssCache = new HashMap<String, ScssCacheEntry>();
+
+ /**
+ * Keeps track of whether a warning about not being able to persist cache
+ * files has already been printed. The flag is protected from concurrent
+ * access by {@link #SCSS_MUTEX}.
+ */
+ private static boolean scssCompileWarWarningEmitted = false;
/**
* Returns the default theme. Must never return null.
@@ -900,10 +952,20 @@ public class VaadinServlet extends HttpServlet implements Constants {
synchronized (SCSS_MUTEX) {
ScssCacheEntry cacheEntry = scssCache.get(scssFilename);
+ if (cacheEntry == null) {
+ try {
+ cacheEntry = loadPersistedScssCache(scssFilename, sc);
+ } catch (Exception e) {
+ getLogger().log(Level.WARNING,
+ "Could not read persisted scss cache", e);
+ }
+ }
+
if (cacheEntry == null || !cacheEntry.isStillValid()) {
cacheEntry = compileScssOnTheFly(filename, scssFilename, sc);
- scssCache.put(scssFilename, cacheEntry);
+ persistCacheEntry(cacheEntry);
}
+ scssCache.put(scssFilename, cacheEntry);
if (cacheEntry == null) {
// compilation did not produce any result, but logged a message
@@ -920,6 +982,29 @@ public class VaadinServlet extends HttpServlet implements Constants {
}
}
+ private ScssCacheEntry loadPersistedScssCache(String scssFilename,
+ ServletContext sc) throws IOException {
+ String realFilename = sc.getRealPath(scssFilename);
+
+ File scssCacheFile = getScssCacheFile(new File(realFilename));
+ if (!scssCacheFile.exists()) {
+ return null;
+ }
+
+ String jsonString = Files.toString(scssCacheFile, Charsets.UTF_8);
+
+ JsonObject entryJson = Json.parse(jsonString);
+
+ String cacheVersion = entryJson.getString("version");
+ if (!Version.getFullVersion().equals(cacheVersion)) {
+ // Compiled for some other Vaadin version, discard cache
+ scssCacheFile.delete();
+ return null;
+ }
+
+ return new ScssCacheEntry(entryJson);
+ }
+
private ScssCacheEntry compileScssOnTheFly(String filename,
String scssFilename, ServletContext sc) throws IOException {
String realFilename = sc.getRealPath(scssFilename);
@@ -951,7 +1036,8 @@ public class VaadinServlet extends HttpServlet implements Constants {
return null;
}
- return new ScssCacheEntry(scss.printState(), scss.getSourceUris());
+ return new ScssCacheEntry(realFilename, scss.printState(),
+ scss.getSourceUris());
}
/**
@@ -1196,6 +1282,36 @@ public class VaadinServlet extends HttpServlet implements Constants {
getService().destroy();
}
+ private static void persistCacheEntry(ScssCacheEntry cacheEntry) {
+ String scssFileName = cacheEntry.getScssFileName();
+ if (scssFileName == null) {
+ if (!scssCompileWarWarningEmitted) {
+ getLogger()
+ .warning(
+ "Could not persist scss cache because no real file was found for the compiled scss file. "
+ + "This might happen e.g. if serving the scss file directly from a .war file.");
+ scssCompileWarWarningEmitted = true;
+ }
+ return;
+ }
+
+ File scssFile = new File(scssFileName);
+ File cacheFile = getScssCacheFile(scssFile);
+
+ String cacheEntryJsonString = cacheEntry.asJson();
+
+ try {
+ Files.write(cacheEntryJsonString, cacheFile, Charsets.UTF_8);
+ } catch (IOException e) {
+ getLogger().log(Level.WARNING,
+ "Error persisting scss cache " + cacheFile, e);
+ }
+ }
+
+ private static File getScssCacheFile(File scssFile) {
+ return new File(scssFile.getParentFile(), scssFile.getName() + ".cache");
+ }
+
/**
* Escapes characters to html entities. An exception is made for some
* "safe characters" to keep the text somewhat readable.
diff --git a/server/src/com/vaadin/server/communication/UIInitHandler.java b/server/src/com/vaadin/server/communication/UIInitHandler.java
index 018274330f..3a6dc1e55f 100644
--- a/server/src/com/vaadin/server/communication/UIInitHandler.java
+++ b/server/src/com/vaadin/server/communication/UIInitHandler.java
@@ -112,7 +112,7 @@ public abstract class UIInitHandler extends SynchronizedRequestHandler {
response.setHeader("Cache-Control", "no-cache");
byte[] b = json.getBytes("UTF-8");
- response.setHeader("Content-Length", String.valueOf(b.length));
+ response.setContentLength(b.length);
OutputStream outputStream = response.getOutputStream();
outputStream.write(b);
diff --git a/server/src/com/vaadin/ui/AbsoluteLayout.java b/server/src/com/vaadin/ui/AbsoluteLayout.java
index 12aa8ea9a6..6353a4b25d 100644
--- a/server/src/com/vaadin/ui/AbsoluteLayout.java
+++ b/server/src/com/vaadin/ui/AbsoluteLayout.java
@@ -746,7 +746,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Private method for writing position attributes
*
- * @since
+ * @since 7.4
* @param node
* target node
* @param key
diff --git a/server/src/com/vaadin/ui/Calendar.java b/server/src/com/vaadin/ui/Calendar.java
index 5b5c390fa1..206cc01d1a 100644
--- a/server/src/com/vaadin/ui/Calendar.java
+++ b/server/src/com/vaadin/ui/Calendar.java
@@ -297,6 +297,11 @@ public class Calendar extends AbstractComponent implements
}
@Override
+ protected CalendarState getState(boolean markAsDirty) {
+ return (CalendarState) super.getState(markAsDirty);
+ }
+
+ @Override
public void beforeClientResponse(boolean initial) {
super.beforeClientResponse(initial);
@@ -1667,7 +1672,7 @@ public class Calendar extends AbstractComponent implements
* weekly mode
*/
public boolean isMonthlyMode() {
- CalendarState state = (CalendarState) getState(false);
+ CalendarState state = getState(false);
if (state.days != null) {
return state.days.size() > 7;
} else {
@@ -1895,4 +1900,34 @@ public class Calendar extends AbstractComponent implements
dropHandler.getAcceptCriterion().paint(target);
}
}
+
+ /**
+ * Sets whether the event captions are rendered as HTML.
+ * <p>
+ * If set to true, the captions are rendered in the browser as HTML and the
+ * developer is responsible for ensuring no harmful HTML is used. If set to
+ * false, the caption is rendered in the browser as plain text.
+ * <p>
+ * The default is false, i.e. to render that caption as plain text.
+ *
+ * @param captionAsHtml
+ * true if the captions are rendered as HTML, false if rendered
+ * as plain text
+ */
+ public void setEventCaptionAsHtml(boolean eventCaptionAsHtml) {
+ getState().eventCaptionAsHtml = eventCaptionAsHtml;
+ }
+
+ /**
+ * Checks whether event captions are rendered as HTML
+ * <p>
+ * The default is false, i.e. to render that caption as plain text.
+ *
+ * @return true if the captions are rendered as HTML, false if rendered as
+ * plain text
+ */
+ public boolean isEventCaptionAsHtml() {
+ return getState(false).eventCaptionAsHtml;
+ }
+
}
diff --git a/server/tests/src/com/vaadin/data/fieldgroup/FieldGroupDate.java b/server/tests/src/com/vaadin/data/fieldgroup/FieldGroupDateTest.java
index fd5d47b32f..ce76f8427b 100644
--- a/server/tests/src/com/vaadin/data/fieldgroup/FieldGroupDate.java
+++ b/server/tests/src/com/vaadin/data/fieldgroup/FieldGroupDateTest.java
@@ -25,7 +25,7 @@ import com.vaadin.data.util.BeanItem;
import com.vaadin.ui.Field;
import com.vaadin.ui.PopupDateField;
-public class FieldGroupDate {
+public class FieldGroupDateTest {
private FieldGroup fieldGroup;
diff --git a/server/tests/src/com/vaadin/data/util/AbstractBeanContainerTest.java b/server/tests/src/com/vaadin/data/util/AbstractBeanContainerTestBase.java
index 1e663afdd2..3d8f08a7ef 100644
--- a/server/tests/src/com/vaadin/data/util/AbstractBeanContainerTest.java
+++ b/server/tests/src/com/vaadin/data/util/AbstractBeanContainerTestBase.java
@@ -6,8 +6,8 @@ package com.vaadin.data.util;
* Only a limited subset of the functionality is tested here, the rest in tests
* of subclasses including {@link BeanItemContainer} and {@link BeanContainer}.
*/
-public abstract class AbstractBeanContainerTest extends
- AbstractInMemoryContainerTest {
+public abstract class AbstractBeanContainerTestBase extends
+ AbstractInMemoryContainerTestBase {
public static class Person {
private String name;
@@ -34,7 +34,7 @@ public abstract class AbstractBeanContainerTest extends
public ClassName(String fullyQualifiedName, Integer idNumber) {
this.fullyQualifiedName = fullyQualifiedName;
- simpleName = AbstractContainerTest
+ simpleName = AbstractContainerTestBase
.getSimpleName(fullyQualifiedName);
reverseFullyQualifiedName = reverse(fullyQualifiedName);
this.idNumber = idNumber;
diff --git a/server/tests/src/com/vaadin/data/util/AbstractContainerTest.java b/server/tests/src/com/vaadin/data/util/AbstractContainerTestBase.java
index a443499a89..54cbc5305d 100644
--- a/server/tests/src/com/vaadin/data/util/AbstractContainerTest.java
+++ b/server/tests/src/com/vaadin/data/util/AbstractContainerTestBase.java
@@ -15,7 +15,7 @@ import com.vaadin.data.Container.Sortable;
import com.vaadin.data.Item;
import com.vaadin.data.util.filter.SimpleStringFilter;
-public abstract class AbstractContainerTest extends TestCase {
+public abstract class AbstractContainerTestBase extends TestCase {
/**
* Helper class for testing e.g. listeners expecting events to be fired.
diff --git a/server/tests/src/com/vaadin/data/util/AbstractHierarchicalContainerTest.java b/server/tests/src/com/vaadin/data/util/AbstractHierarchicalContainerTestBase.java
index 772cd250ce..3bd00cce3c 100644
--- a/server/tests/src/com/vaadin/data/util/AbstractHierarchicalContainerTest.java
+++ b/server/tests/src/com/vaadin/data/util/AbstractHierarchicalContainerTestBase.java
@@ -7,8 +7,8 @@ import com.vaadin.data.Container.Hierarchical;
import com.vaadin.data.Container.Sortable;
import com.vaadin.data.Item;
-public abstract class AbstractHierarchicalContainerTest extends
- AbstractContainerTest {
+public abstract class AbstractHierarchicalContainerTestBase extends
+ AbstractContainerTestBase {
/**
* @param container
diff --git a/server/tests/src/com/vaadin/data/util/AbstractInMemoryContainerTest.java b/server/tests/src/com/vaadin/data/util/AbstractInMemoryContainerTest.java
deleted file mode 100644
index bbad33c5bc..0000000000
--- a/server/tests/src/com/vaadin/data/util/AbstractInMemoryContainerTest.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package com.vaadin.data.util;
-
-public abstract class AbstractInMemoryContainerTest extends
- AbstractContainerTest {
-
-}
diff --git a/server/tests/src/com/vaadin/data/util/AbstractInMemoryContainerTestBase.java b/server/tests/src/com/vaadin/data/util/AbstractInMemoryContainerTestBase.java
new file mode 100644
index 0000000000..d2c1a17bf8
--- /dev/null
+++ b/server/tests/src/com/vaadin/data/util/AbstractInMemoryContainerTestBase.java
@@ -0,0 +1,6 @@
+package com.vaadin.data.util;
+
+public abstract class AbstractInMemoryContainerTestBase extends
+ AbstractContainerTestBase {
+
+}
diff --git a/server/tests/src/com/vaadin/data/util/BeanContainerTest.java b/server/tests/src/com/vaadin/data/util/BeanContainerTest.java
index f22ab8478e..3d755f4397 100644
--- a/server/tests/src/com/vaadin/data/util/BeanContainerTest.java
+++ b/server/tests/src/com/vaadin/data/util/BeanContainerTest.java
@@ -13,7 +13,7 @@ import com.vaadin.data.Container;
import com.vaadin.data.Item;
import com.vaadin.data.util.AbstractBeanContainer.BeanIdResolver;
-public class BeanContainerTest extends AbstractBeanContainerTest {
+public class BeanContainerTest extends AbstractBeanContainerTestBase {
protected static class PersonNameResolver implements
BeanIdResolver<String, Person> {
@@ -345,7 +345,7 @@ public class BeanContainerTest extends AbstractBeanContainerTest {
Person.class);
// resolver that returns null as item id
container
- .setBeanIdResolver(new BeanIdResolver<String, AbstractBeanContainerTest.Person>() {
+ .setBeanIdResolver(new BeanIdResolver<String, AbstractBeanContainerTestBase.Person>() {
@Override
public String getIdForBean(Person bean) {
diff --git a/server/tests/src/com/vaadin/data/util/BeanItemContainerGenerator.java b/server/tests/src/com/vaadin/data/util/BeanItemContainerGenerator.java
index 7400f0efcf..a5bdcc7cf9 100644
--- a/server/tests/src/com/vaadin/data/util/BeanItemContainerGenerator.java
+++ b/server/tests/src/com/vaadin/data/util/BeanItemContainerGenerator.java
@@ -3,9 +3,6 @@ package com.vaadin.data.util;
import java.util.Date;
import java.util.concurrent.atomic.AtomicLong;
-import org.junit.Ignore;
-
-@Ignore
public class BeanItemContainerGenerator {
public static class PortableRandom {
diff --git a/server/tests/src/com/vaadin/data/util/BeanItemContainerTest.java b/server/tests/src/com/vaadin/data/util/BeanItemContainerTest.java
index 2cf64bbc7c..3c30b41d39 100644
--- a/server/tests/src/com/vaadin/data/util/BeanItemContainerTest.java
+++ b/server/tests/src/com/vaadin/data/util/BeanItemContainerTest.java
@@ -25,7 +25,7 @@ import com.vaadin.data.util.filter.Compare;
*
* Most sorting related tests are in {@link BeanItemContainerSortTest}.
*/
-public class BeanItemContainerTest extends AbstractBeanContainerTest {
+public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
// basics from the common container test
diff --git a/server/tests/src/com/vaadin/data/util/TestContainerHierarchicalWrapper.java b/server/tests/src/com/vaadin/data/util/ContainerHierarchicalWrapperTest.java
index ff6de50651..2fd21ef118 100644
--- a/server/tests/src/com/vaadin/data/util/TestContainerHierarchicalWrapper.java
+++ b/server/tests/src/com/vaadin/data/util/ContainerHierarchicalWrapperTest.java
@@ -2,8 +2,8 @@ package com.vaadin.data.util;
import java.util.Collection;
-public class TestContainerHierarchicalWrapper extends
- AbstractHierarchicalContainerTest {
+public class ContainerHierarchicalWrapperTest extends
+ AbstractHierarchicalContainerTestBase {
public void testBasicOperations() {
testBasicContainerOperations(new ContainerHierarchicalWrapper(
diff --git a/server/tests/src/com/vaadin/data/util/TestContainerSorting.java b/server/tests/src/com/vaadin/data/util/ContainerSortingTest.java
index 497699605a..dd713dd7b0 100644
--- a/server/tests/src/com/vaadin/data/util/TestContainerSorting.java
+++ b/server/tests/src/com/vaadin/data/util/ContainerSortingTest.java
@@ -10,7 +10,7 @@ import com.vaadin.data.Container;
import com.vaadin.data.Item;
import com.vaadin.tests.util.TestUtil;
-public class TestContainerSorting extends TestCase {
+public class ContainerSortingTest extends TestCase {
private static final String ITEM_DATA_MINUS2_NULL = "Data -2 null";
private static final String ITEM_DATA_MINUS2 = "Data -2";
diff --git a/server/tests/src/com/vaadin/data/util/TestHierarchicalContainer.java b/server/tests/src/com/vaadin/data/util/HierarchicalContainerTest.java
index 2a336ffc1c..0b71b3dff9 100644
--- a/server/tests/src/com/vaadin/data/util/TestHierarchicalContainer.java
+++ b/server/tests/src/com/vaadin/data/util/HierarchicalContainerTest.java
@@ -3,8 +3,8 @@ package com.vaadin.data.util;
import com.vaadin.data.Container.Filter;
import com.vaadin.data.Item;
-public class TestHierarchicalContainer extends
- AbstractHierarchicalContainerTest {
+public class HierarchicalContainerTest extends
+ AbstractHierarchicalContainerTestBase {
public void testBasicOperations() {
testBasicContainerOperations(new HierarchicalContainer());
diff --git a/server/tests/src/com/vaadin/data/util/TestIndexedContainer.java b/server/tests/src/com/vaadin/data/util/IndexedContainerTest.java
index 91e222af77..5828ac88cc 100644
--- a/server/tests/src/com/vaadin/data/util/TestIndexedContainer.java
+++ b/server/tests/src/com/vaadin/data/util/IndexedContainerTest.java
@@ -11,7 +11,7 @@ import com.vaadin.data.Container.Indexed.ItemRemoveEvent;
import com.vaadin.data.Container.ItemSetChangeListener;
import com.vaadin.data.Item;
-public class TestIndexedContainer extends AbstractInMemoryContainerTest {
+public class IndexedContainerTest extends AbstractInMemoryContainerTestBase {
public void testBasicOperations() {
testBasicContainerOperations(new IndexedContainer());
diff --git a/server/tests/src/com/vaadin/data/util/MethodPropertyMemoryConsumption.java b/server/tests/src/com/vaadin/data/util/MethodPropertyMemoryConsumptionTest.java
index ce0711a29e..b4621b823a 100644
--- a/server/tests/src/com/vaadin/data/util/MethodPropertyMemoryConsumption.java
+++ b/server/tests/src/com/vaadin/data/util/MethodPropertyMemoryConsumptionTest.java
@@ -32,7 +32,7 @@ import org.junit.Test;
* @since 7.2
* @author Vaadin Ltd
*/
-public class MethodPropertyMemoryConsumption {
+public class MethodPropertyMemoryConsumptionTest {
@Test
public void testSetArguments() throws NoSuchFieldException,
diff --git a/server/tests/src/com/vaadin/data/util/PerformanceTestIndexedContainer.java b/server/tests/src/com/vaadin/data/util/PerformanceTestIndexedContainerTest.java
index 1c49017bf1..042f260be8 100644
--- a/server/tests/src/com/vaadin/data/util/PerformanceTestIndexedContainer.java
+++ b/server/tests/src/com/vaadin/data/util/PerformanceTestIndexedContainerTest.java
@@ -10,7 +10,7 @@ import junit.framework.TestCase;
import org.junit.Assert;
-public class PerformanceTestIndexedContainer extends TestCase {
+public class PerformanceTestIndexedContainerTest extends TestCase {
private static final int REPEATS = 10;
private final static int ITEMS = 50000;
diff --git a/server/tests/src/com/vaadin/data/util/ReflectToolsGetSuperField.java b/server/tests/src/com/vaadin/data/util/ReflectToolsGetSuperFieldTest.java
index dc828689a8..5f31150210 100644
--- a/server/tests/src/com/vaadin/data/util/ReflectToolsGetSuperField.java
+++ b/server/tests/src/com/vaadin/data/util/ReflectToolsGetSuperFieldTest.java
@@ -8,7 +8,7 @@ import com.vaadin.data.fieldgroup.FieldGroup;
import com.vaadin.data.fieldgroup.PropertyId;
import com.vaadin.ui.TextField;
-public class ReflectToolsGetSuperField {
+public class ReflectToolsGetSuperFieldTest {
@Test
public void getFieldFromSuperClass() {
diff --git a/server/tests/src/com/vaadin/data/util/filter/AbstractFilterTest.java b/server/tests/src/com/vaadin/data/util/filter/AbstractFilterTestBase.java
index 96673ff608..ebd843fb53 100644
--- a/server/tests/src/com/vaadin/data/util/filter/AbstractFilterTest.java
+++ b/server/tests/src/com/vaadin/data/util/filter/AbstractFilterTestBase.java
@@ -8,7 +8,7 @@ import com.vaadin.data.Property;
import com.vaadin.data.util.ObjectProperty;
import com.vaadin.data.util.PropertysetItem;
-public abstract class AbstractFilterTest<FILTERTYPE extends Filter> extends
+public abstract class AbstractFilterTestBase<FILTERTYPE extends Filter> extends
TestCase {
protected static final String PROPERTY1 = "property1";
diff --git a/server/tests/src/com/vaadin/data/util/filter/AndOrFilterTest.java b/server/tests/src/com/vaadin/data/util/filter/AndOrFilterTest.java
index e5bc622e39..012d0ef0bc 100644
--- a/server/tests/src/com/vaadin/data/util/filter/AndOrFilterTest.java
+++ b/server/tests/src/com/vaadin/data/util/filter/AndOrFilterTest.java
@@ -6,7 +6,7 @@ import com.vaadin.data.Container.Filter;
import com.vaadin.data.Item;
import com.vaadin.data.util.BeanItem;
-public class AndOrFilterTest extends AbstractFilterTest<AbstractJunctionFilter> {
+public class AndOrFilterTest extends AbstractFilterTestBase<AbstractJunctionFilter> {
protected Item item1 = new BeanItem<Integer>(1);
protected Item item2 = new BeanItem<Integer>(2);
diff --git a/server/tests/src/com/vaadin/data/util/filter/CompareFilterTest.java b/server/tests/src/com/vaadin/data/util/filter/CompareFilterTest.java
index 732a541c89..fc5ffb9b56 100644
--- a/server/tests/src/com/vaadin/data/util/filter/CompareFilterTest.java
+++ b/server/tests/src/com/vaadin/data/util/filter/CompareFilterTest.java
@@ -15,7 +15,7 @@ import com.vaadin.data.util.filter.Compare.GreaterOrEqual;
import com.vaadin.data.util.filter.Compare.Less;
import com.vaadin.data.util.filter.Compare.LessOrEqual;
-public class CompareFilterTest extends AbstractFilterTest<Compare> {
+public class CompareFilterTest extends AbstractFilterTestBase<Compare> {
protected Item itemNull;
protected Item itemEmpty;
diff --git a/server/tests/src/com/vaadin/data/util/filter/IsNullFilterTest.java b/server/tests/src/com/vaadin/data/util/filter/IsNullFilterTest.java
index d3e959e069..953bf3cd65 100644
--- a/server/tests/src/com/vaadin/data/util/filter/IsNullFilterTest.java
+++ b/server/tests/src/com/vaadin/data/util/filter/IsNullFilterTest.java
@@ -7,7 +7,7 @@ import com.vaadin.data.Item;
import com.vaadin.data.util.ObjectProperty;
import com.vaadin.data.util.PropertysetItem;
-public class IsNullFilterTest extends AbstractFilterTest<IsNull> {
+public class IsNullFilterTest extends AbstractFilterTestBase<IsNull> {
public void testIsNull() {
Item item1 = new PropertysetItem();
diff --git a/server/tests/src/com/vaadin/data/util/filter/LikeFilterTest.java b/server/tests/src/com/vaadin/data/util/filter/LikeFilterTest.java
index 0fcbd26b8e..9ba5168ac9 100644
--- a/server/tests/src/com/vaadin/data/util/filter/LikeFilterTest.java
+++ b/server/tests/src/com/vaadin/data/util/filter/LikeFilterTest.java
@@ -22,7 +22,7 @@ import com.vaadin.data.Item;
import com.vaadin.data.util.ObjectProperty;
import com.vaadin.data.util.PropertysetItem;
-public class LikeFilterTest extends AbstractFilterTest<Like> {
+public class LikeFilterTest extends AbstractFilterTestBase<Like> {
protected Item item1 = new PropertysetItem();
protected Item item2 = new PropertysetItem();
diff --git a/server/tests/src/com/vaadin/data/util/filter/NotFilterTest.java b/server/tests/src/com/vaadin/data/util/filter/NotFilterTest.java
index 966ffd3a6e..310b749ce2 100644
--- a/server/tests/src/com/vaadin/data/util/filter/NotFilterTest.java
+++ b/server/tests/src/com/vaadin/data/util/filter/NotFilterTest.java
@@ -6,7 +6,7 @@ import com.vaadin.data.Container.Filter;
import com.vaadin.data.Item;
import com.vaadin.data.util.BeanItem;
-public class NotFilterTest extends AbstractFilterTest<Not> {
+public class NotFilterTest extends AbstractFilterTestBase<Not> {
protected Item item1 = new BeanItem<Integer>(1);
protected Item item2 = new BeanItem<Integer>(2);
diff --git a/server/tests/src/com/vaadin/data/util/filter/SimpleStringFilterTest.java b/server/tests/src/com/vaadin/data/util/filter/SimpleStringFilterTest.java
index eb7dff6015..fcaff6f2c3 100644
--- a/server/tests/src/com/vaadin/data/util/filter/SimpleStringFilterTest.java
+++ b/server/tests/src/com/vaadin/data/util/filter/SimpleStringFilterTest.java
@@ -3,7 +3,7 @@ package com.vaadin.data.util.filter;
import org.junit.Assert;
public class SimpleStringFilterTest extends
- AbstractFilterTest<SimpleStringFilter> {
+ AbstractFilterTestBase<SimpleStringFilter> {
protected static TestItem<String, String> createTestItem() {
return new TestItem<String, String>("abcde", "TeSt");
diff --git a/server/tests/src/com/vaadin/data/util/sqlcontainer/DataGenerator.java b/server/tests/src/com/vaadin/data/util/sqlcontainer/DataGenerator.java
index b76e3df10e..f6619a33b6 100644
--- a/server/tests/src/com/vaadin/data/util/sqlcontainer/DataGenerator.java
+++ b/server/tests/src/com/vaadin/data/util/sqlcontainer/DataGenerator.java
@@ -13,12 +13,6 @@ import com.vaadin.data.util.sqlcontainer.connection.JDBCConnectionPool;
public class DataGenerator {
- @Test
- public void testDummy() {
- // Added dummy test so JUnit will not complain about
- // "No runnable methods".
- }
-
public static void addPeopleToDatabase(JDBCConnectionPool connectionPool)
throws SQLException {
Connection conn = connectionPool.reserveConnection();
diff --git a/server/tests/src/com/vaadin/data/util/sqlcontainer/FreeformQueryUtil.java b/server/tests/src/com/vaadin/data/util/sqlcontainer/FreeformQueryUtil.java
index e30ff8f5da..288cb65fae 100644
--- a/server/tests/src/com/vaadin/data/util/sqlcontainer/FreeformQueryUtil.java
+++ b/server/tests/src/com/vaadin/data/util/sqlcontainer/FreeformQueryUtil.java
@@ -11,12 +11,6 @@ import com.vaadin.data.util.sqlcontainer.query.generator.filter.QueryBuilder;
public class FreeformQueryUtil {
- @Test
- public void testDummy() {
- // Added dummy test so JUnit will not complain about
- // "No runnable methods".
- }
-
public static StatementHelper getQueryWithFilters(List<Filter> filters,
int offset, int limit) {
StatementHelper sh = new StatementHelper();
diff --git a/server/tests/src/com/vaadin/data/util/sqlcontainer/SQLContainerTableQueryTest.java b/server/tests/src/com/vaadin/data/util/sqlcontainer/SQLContainerTableQueryTest.java
index 2d66b728a7..bef57fd7d1 100644
--- a/server/tests/src/com/vaadin/data/util/sqlcontainer/SQLContainerTableQueryTest.java
+++ b/server/tests/src/com/vaadin/data/util/sqlcontainer/SQLContainerTableQueryTest.java
@@ -70,8 +70,7 @@ public class SQLContainerTableQueryTest {
}
@Test
- public void itemWithExistingVersionColumnIsRemoved()
- throws SQLException {
+ public void itemWithExistingVersionColumnIsRemoved() throws SQLException {
container.setAutoCommit(true);
peopleQuery.setVersionColumn("ID");
@@ -79,7 +78,8 @@ public class SQLContainerTableQueryTest {
}
@Test(expected = IllegalArgumentException.class)
- public void itemWithNonExistingVersionColumnCannotBeRemoved() throws SQLException {
+ public void itemWithNonExistingVersionColumnCannotBeRemoved()
+ throws SQLException {
peopleQuery.setVersionColumn("version");
container.removeItem(container.lastItemId());
@@ -99,33 +99,32 @@ public class SQLContainerTableQueryTest {
SQLContainer container = new SQLContainer(new TableQuery("people",
connectionPool, SQLTestsConstants.sqlGen));
- assertTrue(container.containsId(new RowId(
- new Object[]{1 + offset})));
+ assertTrue(container.containsId(new RowId(new Object[] { 1 + offset })));
Assert.assertTrue(container.containsId(new RowId(
new Object[] { 1 + offset })));
assertTrue(this.container.containsId(new RowId(
- new Object[]{1 + offset})));
+ new Object[] { 1 + offset })));
}
@Test
public void containsId_withTableQueryAndNonexistingId_returnsFalse()
throws SQLException {
Assert.assertFalse(container.containsId(new RowId(
- new Object[]{1337 + offset})));
+ new Object[] { 1337 + offset })));
}
@Test
public void getContainerProperty_tableExistingItemIdAndNonexistingPropertyId_returnsNull()
throws SQLException {
Assert.assertNull(container.getContainerProperty(new RowId(
- new Object[]{1 + offset}), "asdf"));
+ new Object[] { 1 + offset }), "asdf"));
}
@Test
public void getContainerProperty_tableNonexistingItemId_returnsNull()
throws SQLException {
Assert.assertNull(container.getContainerProperty(new RowId(
- new Object[]{1337 + offset}), "NAME"));
+ new Object[] { 1337 + offset }), "NAME"));
}
@Test
@@ -156,24 +155,23 @@ public class SQLContainerTableQueryTest {
"Ville",
container
.getContainerProperty(
- new RowId(new Object[]{new BigDecimal(
- 0 + offset)}), "NAME").getValue());
+ new RowId(new Object[] { new BigDecimal(
+ 0 + offset) }), "NAME").getValue());
} else {
Assert.assertEquals(
"Ville",
container.getContainerProperty(
- new RowId(new Object[]{0 + offset}), "NAME")
+ new RowId(new Object[] { 0 + offset }), "NAME")
.getValue());
}
}
-
@Test
public void getContainerPropertyIds_table_returnsIDAndNAME()
throws SQLException {
Collection<?> propertyIds = container.getContainerPropertyIds();
Assert.assertEquals(3, propertyIds.size());
- Assert.assertArrayEquals(new String[]{"ID", "NAME", "AGE"},
+ Assert.assertArrayEquals(new String[] { "ID", "NAME", "AGE" },
propertyIds.toArray());
}
@@ -288,10 +286,10 @@ public class SQLContainerTableQueryTest {
throws SQLException {
if (SQLTestsConstants.db == DB.ORACLE) {
Assert.assertEquals(3, container.indexOfId(new RowId(
- new Object[]{new BigDecimal(3 + offset)})));
+ new Object[] { new BigDecimal(3 + offset) })));
} else {
Assert.assertEquals(3,
- container.indexOfId(new RowId(new Object[]{3 + offset})));
+ container.indexOfId(new RowId(new Object[] { 3 + offset })));
}
}
@@ -301,14 +299,14 @@ public class SQLContainerTableQueryTest {
DataGenerator.addFiveThousandPeople(connectionPool);
if (SQLTestsConstants.db == DB.ORACLE) {
- container.getItem(new RowId(new Object[]{new BigDecimal(
- 1337 + offset)}));
+ container.getItem(new RowId(new Object[] { new BigDecimal(
+ 1337 + offset) }));
Assert.assertEquals(1337, container.indexOfId(new RowId(
- new Object[]{new BigDecimal(1337 + offset)})));
+ new Object[] { new BigDecimal(1337 + offset) })));
} else {
- container.getItem(new RowId(new Object[]{1337 + offset}));
+ container.getItem(new RowId(new Object[] { 1337 + offset }));
Assert.assertEquals(1337, container.indexOfId(new RowId(
- new Object[]{1337 + offset})));
+ new Object[] { 1337 + offset })));
}
}
@@ -332,7 +330,7 @@ public class SQLContainerTableQueryTest {
throws SQLException {
DataGenerator.addFiveThousandPeople(connectionPool);
- Object itemId = container.getIdByIndex(1337);
+ Object itemId = container.getIdByIndex(1337);
if (SQLTestsConstants.db == DB.ORACLE) {
Assert.assertEquals(
new RowId(new Object[] { 1337 + offset }).toString(),
@@ -367,10 +365,10 @@ public class SQLContainerTableQueryTest {
Object itemId = container.getIdByIndex(1337);
if (SQLTestsConstants.db == DB.ORACLE) {
Assert.assertEquals(
- new RowId(new Object[]{1336 + offset}).toString(),
+ new RowId(new Object[] { 1336 + offset }).toString(),
container.prevItemId(itemId).toString());
} else {
- Assert.assertEquals(new RowId(new Object[]{1336 + offset}),
+ Assert.assertEquals(new RowId(new Object[] { 1336 + offset }),
container.prevItemId(itemId));
}
}
@@ -379,10 +377,10 @@ public class SQLContainerTableQueryTest {
public void firstItemId_table_returnsItemId0() throws SQLException {
if (SQLTestsConstants.db == DB.ORACLE) {
Assert.assertEquals(
- new RowId(new Object[]{0 + offset}).toString(),
+ new RowId(new Object[] { 0 + offset }).toString(),
container.firstItemId().toString());
} else {
- Assert.assertEquals(new RowId(new Object[]{0 + offset}),
+ Assert.assertEquals(new RowId(new Object[] { 0 + offset }),
container.firstItemId());
}
}
@@ -394,10 +392,10 @@ public class SQLContainerTableQueryTest {
if (SQLTestsConstants.db == DB.ORACLE) {
Assert.assertEquals(
- new RowId(new Object[]{4999 + offset}).toString(),
+ new RowId(new Object[] { 4999 + offset }).toString(),
container.lastItemId().toString());
} else {
- Assert.assertEquals(new RowId(new Object[]{4999 + offset}),
+ Assert.assertEquals(new RowId(new Object[] { 4999 + offset }),
container.lastItemId());
}
}
@@ -406,10 +404,10 @@ public class SQLContainerTableQueryTest {
public void isFirstId_tableActualFirstId_returnsTrue() throws SQLException {
if (SQLTestsConstants.db == DB.ORACLE) {
assertTrue(container.isFirstId(new RowId(
- new Object[]{new BigDecimal(0 + offset)})));
+ new Object[] { new BigDecimal(0 + offset) })));
} else {
assertTrue(container.isFirstId(new RowId(
- new Object[]{0 + offset})));
+ new Object[] { 0 + offset })));
}
}
@@ -417,10 +415,10 @@ public class SQLContainerTableQueryTest {
public void isFirstId_tableSecondId_returnsFalse() throws SQLException {
if (SQLTestsConstants.db == DB.ORACLE) {
Assert.assertFalse(container.isFirstId(new RowId(
- new Object[]{new BigDecimal(1 + offset)})));
+ new Object[] { new BigDecimal(1 + offset) })));
} else {
Assert.assertFalse(container.isFirstId(new RowId(
- new Object[]{1 + offset})));
+ new Object[] { 1 + offset })));
}
}
@@ -428,10 +426,10 @@ public class SQLContainerTableQueryTest {
public void isLastId_tableSecondId_returnsFalse() throws SQLException {
if (SQLTestsConstants.db == DB.ORACLE) {
Assert.assertFalse(container.isLastId(new RowId(
- new Object[]{new BigDecimal(1 + offset)})));
+ new Object[] { new BigDecimal(1 + offset) })));
} else {
Assert.assertFalse(container.isLastId(new RowId(
- new Object[]{1 + offset})));
+ new Object[] { 1 + offset })));
}
}
@@ -439,10 +437,10 @@ public class SQLContainerTableQueryTest {
public void isLastId_tableLastId_returnsTrue() throws SQLException {
if (SQLTestsConstants.db == DB.ORACLE) {
assertTrue(container.isLastId(new RowId(
- new Object[]{new BigDecimal(3 + offset)})));
+ new Object[] { new BigDecimal(3 + offset) })));
} else {
- assertTrue(container.isLastId(new RowId(
- new Object[]{3 + offset})));
+ assertTrue(container
+ .isLastId(new RowId(new Object[] { 3 + offset })));
}
}
@@ -451,10 +449,10 @@ public class SQLContainerTableQueryTest {
DataGenerator.addFiveThousandPeople(connectionPool);
if (SQLTestsConstants.db == DB.ORACLE) {
assertTrue(container.isLastId(new RowId(
- new Object[]{new BigDecimal(4999 + offset)})));
+ new Object[] { new BigDecimal(4999 + offset) })));
} else {
assertTrue(container.isLastId(new RowId(
- new Object[]{4999 + offset})));
+ new Object[] { 4999 + offset })));
}
}
@@ -862,6 +860,7 @@ public class SQLContainerTableQueryTest {
assertTrue(garbageContainer.removeItem(first));
Assert.assertSame(second, garbageContainer.firstItemId());
}
+
@Test
public void lastItemId_tableLastItemRemoved_resultChanges()
throws SQLException {
diff --git a/server/tests/src/com/vaadin/data/util/sqlcontainer/connection/MockInitialContextFactory.java b/server/tests/src/com/vaadin/data/util/sqlcontainer/connection/MockInitialContextFactory.java
index 324899e373..1c70c8dad7 100644
--- a/server/tests/src/com/vaadin/data/util/sqlcontainer/connection/MockInitialContextFactory.java
+++ b/server/tests/src/com/vaadin/data/util/sqlcontainer/connection/MockInitialContextFactory.java
@@ -12,12 +12,6 @@ import org.junit.Test;
public class MockInitialContextFactory implements InitialContextFactory {
private static Context mockCtx = null;
- @Test
- public void testDummy() {
- // Added dummy test so JUnit will not complain about
- // "No runnable methods".
- }
-
public static void setMockContext(Context ctx) {
mockCtx = ctx;
}
diff --git a/server/tests/src/com/vaadin/server/JSONSerializerTest.java b/server/tests/src/com/vaadin/server/JSONSerializerTest.java
index 393cea1c4c..6c57445564 100644
--- a/server/tests/src/com/vaadin/server/JSONSerializerTest.java
+++ b/server/tests/src/com/vaadin/server/JSONSerializerTest.java
@@ -57,8 +57,8 @@ public class JSONSerializerTest extends TestCase {
stringToStateMap.put("string - state 1", s);
stringToStateMap.put("String - state 2", s2);
- JsonValue encodedMap = JsonCodec.encode(stringToStateMap, null, mapType,
- null).getEncodedValue();
+ JsonValue encodedMap = JsonCodec.encode(stringToStateMap, null,
+ mapType, null).getEncodedValue();
ensureDecodedCorrectly(stringToStateMap, encodedMap, mapType);
}
@@ -74,8 +74,8 @@ public class JSONSerializerTest extends TestCase {
stateToStringMap.put(s, "string - state 1");
stateToStringMap.put(s2, "String - state 2");
- JsonValue encodedMap = JsonCodec.encode(stateToStringMap, null, mapType,
- null).getEncodedValue();
+ JsonValue encodedMap = JsonCodec.encode(stateToStringMap, null,
+ mapType, null).getEncodedValue();
ensureDecodedCorrectly(stateToStringMap, encodedMap, mapType);
}
diff --git a/server/tests/src/com/vaadin/server/VaadinGateInRequestTests.java b/server/tests/src/com/vaadin/server/VaadinGateInRequestTest.java
index 4478b4cf39..eda2b3a006 100644
--- a/server/tests/src/com/vaadin/server/VaadinGateInRequestTests.java
+++ b/server/tests/src/com/vaadin/server/VaadinGateInRequestTest.java
@@ -20,8 +20,8 @@ import static org.mockito.Mockito.spy;
import com.vaadin.server.VaadinPortlet.VaadinGateInRequest;
-public class VaadinGateInRequestTests extends
- VaadinHttpAndPortletRequestTests<VaadinGateInRequest> {
+public class VaadinGateInRequestTest extends
+ VaadinHttpAndPortletRequestTestBase<VaadinGateInRequest> {
@Override
protected VaadinGateInRequest createSut() {
diff --git a/server/tests/src/com/vaadin/server/VaadinHttpAndPortletRequestTests.java b/server/tests/src/com/vaadin/server/VaadinHttpAndPortletRequestTestBase.java
index a87eb1870e..0f7cce5f75 100644
--- a/server/tests/src/com/vaadin/server/VaadinHttpAndPortletRequestTests.java
+++ b/server/tests/src/com/vaadin/server/VaadinHttpAndPortletRequestTestBase.java
@@ -33,9 +33,7 @@ import org.junit.Test;
import com.vaadin.server.VaadinPortlet.VaadinHttpAndPortletRequest;
import com.vaadin.server.VaadinPortletService;
-//Have to ignore this class - otherwise JUnit tries to instantiate it...
-@Ignore
-public abstract class VaadinHttpAndPortletRequestTests<T extends VaadinHttpAndPortletRequest> {
+public abstract class VaadinHttpAndPortletRequestTestBase<T extends VaadinHttpAndPortletRequest> {
protected VaadinHttpAndPortletRequest sut;
protected HttpServletRequest servletRequest;
diff --git a/server/tests/src/com/vaadin/server/VaadinLiferayRequestTests.java b/server/tests/src/com/vaadin/server/VaadinLiferayRequestTest.java
index 8ccd649ea4..3024cd652f 100644
--- a/server/tests/src/com/vaadin/server/VaadinLiferayRequestTests.java
+++ b/server/tests/src/com/vaadin/server/VaadinLiferayRequestTest.java
@@ -20,8 +20,8 @@ import static org.mockito.Mockito.spy;
import com.vaadin.server.VaadinPortlet.VaadinLiferayRequest;
-public class VaadinLiferayRequestTests extends
- VaadinHttpAndPortletRequestTests<VaadinLiferayRequest> {
+public class VaadinLiferayRequestTest extends
+ VaadinHttpAndPortletRequestTestBase<VaadinLiferayRequest> {
@Override
protected VaadinLiferayRequest createSut() {
diff --git a/server/tests/src/com/vaadin/server/VaadinWebSpherePortalRequestTests.java b/server/tests/src/com/vaadin/server/VaadinWebSpherePortalRequestTest.java
index a1abfbd280..3a4c5c69be 100644
--- a/server/tests/src/com/vaadin/server/VaadinWebSpherePortalRequestTests.java
+++ b/server/tests/src/com/vaadin/server/VaadinWebSpherePortalRequestTest.java
@@ -20,8 +20,8 @@ import static org.mockito.Mockito.spy;
import com.vaadin.server.VaadinPortlet.VaadinWebSpherePortalRequest;
-public class VaadinWebSpherePortalRequestTests extends
- VaadinHttpAndPortletRequestTests<VaadinWebSpherePortalRequest> {
+public class VaadinWebSpherePortalRequestTest extends
+ VaadinHttpAndPortletRequestTestBase<VaadinWebSpherePortalRequest> {
@Override
protected VaadinWebSpherePortalRequest createSut() {
diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestAnyEnumToStringConverter.java b/server/tests/src/com/vaadin/tests/data/converter/AnyEnumToStringConverterTest.java
index 64b06f651e..83b4abad3f 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/TestAnyEnumToStringConverter.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/AnyEnumToStringConverterTest.java
@@ -29,7 +29,7 @@ import com.vaadin.tests.data.bean.AnotherTestEnum;
import com.vaadin.tests.data.bean.TestEnum;
import com.vaadin.ui.TextField;
-public class TestAnyEnumToStringConverter {
+public class AnyEnumToStringConverterTest {
public class AnyEnumToStringConverter implements Converter<Enum, String> {
diff --git a/server/tests/src/com/vaadin/tests/data/converter/ConverterFactory.java b/server/tests/src/com/vaadin/tests/data/converter/ConverterFactoryTest.java
index 32c9dc6604..a61c0c9986 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/ConverterFactory.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/ConverterFactoryTest.java
@@ -25,7 +25,7 @@ import com.vaadin.server.VaadinSession;
import com.vaadin.tests.util.AlwaysLockedVaadinSession;
import com.vaadin.ui.TextField;
-public class ConverterFactory extends TestCase {
+public class ConverterFactoryTest extends TestCase {
public static class ConvertTo42 implements Converter<String, Integer> {
diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestDateToLongConverter.java b/server/tests/src/com/vaadin/tests/data/converter/DateToLongConverterTest.java
index 6b9fa93e27..d767430cc1 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/TestDateToLongConverter.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/DateToLongConverterTest.java
@@ -6,7 +6,7 @@ import junit.framework.TestCase;
import com.vaadin.data.util.converter.DateToLongConverter;
-public class TestDateToLongConverter extends TestCase {
+public class DateToLongConverterTest extends TestCase {
DateToLongConverter converter = new DateToLongConverter();
diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestDateToSqlDateConverter.java b/server/tests/src/com/vaadin/tests/data/converter/DateToSqlDateConverterTest.java
index d591d10e18..46dca6d13e 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/TestDateToSqlDateConverter.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/DateToSqlDateConverterTest.java
@@ -7,7 +7,7 @@ import junit.framework.TestCase;
import com.vaadin.data.util.converter.DateToSqlDateConverter;
-public class TestDateToSqlDateConverter extends TestCase {
+public class DateToSqlDateConverterTest extends TestCase {
DateToSqlDateConverter converter = new DateToSqlDateConverter();
diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestDefaultConverterFactory.java b/server/tests/src/com/vaadin/tests/data/converter/DefaultConverterFactoryTest.java
index e1becf43e1..047ed8a79f 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/TestDefaultConverterFactory.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/DefaultConverterFactoryTest.java
@@ -25,7 +25,7 @@ import org.junit.Test;
import com.vaadin.data.util.converter.DefaultConverterFactory;
-public class TestDefaultConverterFactory {
+public class DefaultConverterFactoryTest {
private DefaultConverterFactory factory = new DefaultConverterFactory();
diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestSpecificEnumToStringConverter.java b/server/tests/src/com/vaadin/tests/data/converter/SpecificEnumToStringConverterTest.java
index 75c742775f..377998db1e 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/TestSpecificEnumToStringConverter.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/SpecificEnumToStringConverterTest.java
@@ -29,7 +29,7 @@ import com.vaadin.tests.data.bean.AnotherTestEnum;
import com.vaadin.tests.data.bean.TestEnum;
import com.vaadin.ui.TextField;
-public class TestSpecificEnumToStringConverter {
+public class SpecificEnumToStringConverterTest {
public class SpecificEnumToStringConverter implements
Converter<Enum, String> {
diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestStringToBigDecimalConverter.java b/server/tests/src/com/vaadin/tests/data/converter/StringToBigDecimalConverterTest.java
index b8e74c7572..06d407c9f4 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/TestStringToBigDecimalConverter.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/StringToBigDecimalConverterTest.java
@@ -22,7 +22,7 @@ import junit.framework.TestCase;
import com.vaadin.data.util.converter.StringToBigDecimalConverter;
-public class TestStringToBigDecimalConverter extends TestCase {
+public class StringToBigDecimalConverterTest extends TestCase {
StringToBigDecimalConverter converter = new StringToBigDecimalConverter();
diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestStringToBigIntegerConverter.java b/server/tests/src/com/vaadin/tests/data/converter/StringToBigIntegerConverterTest.java
index 8d493609fe..057017790d 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/TestStringToBigIntegerConverter.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/StringToBigIntegerConverterTest.java
@@ -22,7 +22,7 @@ import junit.framework.TestCase;
import com.vaadin.data.util.converter.StringToBigIntegerConverter;
-public class TestStringToBigIntegerConverter extends TestCase {
+public class StringToBigIntegerConverterTest extends TestCase {
StringToBigIntegerConverter converter = new StringToBigIntegerConverter();
diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestStringToBooleanConverter.java b/server/tests/src/com/vaadin/tests/data/converter/StringToBooleanConverterTest.java
index 7be922a63a..f734d76633 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/TestStringToBooleanConverter.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/StringToBooleanConverterTest.java
@@ -4,7 +4,7 @@ import junit.framework.TestCase;
import com.vaadin.data.util.converter.StringToBooleanConverter;
-public class TestStringToBooleanConverter extends TestCase {
+public class StringToBooleanConverterTest extends TestCase {
StringToBooleanConverter converter = new StringToBooleanConverter();
diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestStringToByteConverter.java b/server/tests/src/com/vaadin/tests/data/converter/StringToByteConverterTest.java
index 19a68fbfdb..3859d03cc3 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/TestStringToByteConverter.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/StringToByteConverterTest.java
@@ -9,7 +9,7 @@ import com.vaadin.data.util.converter.Converter.ConversionException;
import com.vaadin.data.util.converter.ReverseConverter;
import com.vaadin.data.util.converter.StringToByteConverter;
-public class TestStringToByteConverter extends TestCase {
+public class StringToByteConverterTest extends TestCase {
StringToByteConverter converter = new StringToByteConverter();
Converter<Byte, String> reverseConverter = new ReverseConverter<Byte, String>(
diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestStringToDateConverter.java b/server/tests/src/com/vaadin/tests/data/converter/StringToDateConverterTest.java
index eb0e1461b2..16008d89c2 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/TestStringToDateConverter.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/StringToDateConverterTest.java
@@ -7,7 +7,7 @@ import junit.framework.TestCase;
import com.vaadin.data.util.converter.StringToDateConverter;
-public class TestStringToDateConverter extends TestCase {
+public class StringToDateConverterTest extends TestCase {
StringToDateConverter converter = new StringToDateConverter();
diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestStringToDoubleConverter.java b/server/tests/src/com/vaadin/tests/data/converter/StringToDoubleConverterTest.java
index 14691bd922..7054587009 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/TestStringToDoubleConverter.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/StringToDoubleConverterTest.java
@@ -4,7 +4,7 @@ import junit.framework.TestCase;
import com.vaadin.data.util.converter.StringToDoubleConverter;
-public class TestStringToDoubleConverter extends TestCase {
+public class StringToDoubleConverterTest extends TestCase {
StringToDoubleConverter converter = new StringToDoubleConverter();
diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestStringToEnumConverter.java b/server/tests/src/com/vaadin/tests/data/converter/StringToEnumConverterTest.java
index 5dc24ca43a..a4c3732e1f 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/TestStringToEnumConverter.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/StringToEnumConverterTest.java
@@ -7,7 +7,7 @@ import com.vaadin.data.util.converter.Converter.ConversionException;
import com.vaadin.data.util.converter.ReverseConverter;
import com.vaadin.data.util.converter.StringToEnumConverter;
-public class TestStringToEnumConverter extends TestCase {
+public class StringToEnumConverterTest extends TestCase {
public static enum FooEnum {
VALUE1, SOME_VALUE, FOO_BAR_BAZ, Bar, nonStandardCase, _HUGH;
diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestStringToFloatConverter.java b/server/tests/src/com/vaadin/tests/data/converter/StringToFloatConverterTest.java
index 6721a92b1a..86319e641c 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/TestStringToFloatConverter.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/StringToFloatConverterTest.java
@@ -4,7 +4,7 @@ import junit.framework.TestCase;
import com.vaadin.data.util.converter.StringToFloatConverter;
-public class TestStringToFloatConverter extends TestCase {
+public class StringToFloatConverterTest extends TestCase {
StringToFloatConverter converter = new StringToFloatConverter();
diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestStringToIntegerConverter.java b/server/tests/src/com/vaadin/tests/data/converter/StringToIntegerConverterTest.java
index e810106631..0076f2c9d1 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/TestStringToIntegerConverter.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/StringToIntegerConverterTest.java
@@ -5,7 +5,7 @@ import junit.framework.TestCase;
import com.vaadin.data.util.converter.Converter.ConversionException;
import com.vaadin.data.util.converter.StringToIntegerConverter;
-public class TestStringToIntegerConverter extends TestCase {
+public class StringToIntegerConverterTest extends TestCase {
StringToIntegerConverter converter = new StringToIntegerConverter();
diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestStringToLongConverter.java b/server/tests/src/com/vaadin/tests/data/converter/StringToLongConverterTest.java
index 0e95975c17..989dbcbbf5 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/TestStringToLongConverter.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/StringToLongConverterTest.java
@@ -10,7 +10,7 @@ import com.vaadin.data.util.converter.Converter;
import com.vaadin.data.util.converter.ReverseConverter;
import com.vaadin.data.util.converter.StringToLongConverter;
-public class TestStringToLongConverter extends TestCase {
+public class StringToLongConverterTest extends TestCase {
StringToLongConverter converter = new StringToLongConverter();
Converter<Long, String> reverseConverter = new ReverseConverter<Long, String>(
diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestStringToShortConverter.java b/server/tests/src/com/vaadin/tests/data/converter/StringToShortConverterTest.java
index 542c580025..ab255bce80 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/TestStringToShortConverter.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/StringToShortConverterTest.java
@@ -9,7 +9,7 @@ import com.vaadin.data.util.converter.Converter.ConversionException;
import com.vaadin.data.util.converter.ReverseConverter;
import com.vaadin.data.util.converter.StringToShortConverter;
-public class TestStringToShortConverter extends TestCase {
+public class StringToShortConverterTest extends TestCase {
StringToShortConverter converter = new StringToShortConverter();
Converter<Short, String> reverseConverter = new ReverseConverter<Short, String>(
diff --git a/server/tests/src/com/vaadin/tests/data/validator/TestBigDecimalRangeValidator.java b/server/tests/src/com/vaadin/tests/data/validator/BigDecimalRangeValidatorTest.java
index 2ce576fb77..36f120151b 100644
--- a/server/tests/src/com/vaadin/tests/data/validator/TestBigDecimalRangeValidator.java
+++ b/server/tests/src/com/vaadin/tests/data/validator/BigDecimalRangeValidatorTest.java
@@ -6,7 +6,7 @@ import junit.framework.TestCase;
import com.vaadin.data.validator.BigDecimalRangeValidator;
-public class TestBigDecimalRangeValidator extends TestCase {
+public class BigDecimalRangeValidatorTest extends TestCase {
private BigDecimalRangeValidator cleanValidator = new BigDecimalRangeValidator(
"no values", null, null);
diff --git a/server/tests/src/com/vaadin/tests/data/validator/TestBigIntegerRangeValidator.java b/server/tests/src/com/vaadin/tests/data/validator/BigIntegerRangeValidatorTest.java
index d3263df6d2..92fabbb02a 100644
--- a/server/tests/src/com/vaadin/tests/data/validator/TestBigIntegerRangeValidator.java
+++ b/server/tests/src/com/vaadin/tests/data/validator/BigIntegerRangeValidatorTest.java
@@ -6,7 +6,7 @@ import junit.framework.TestCase;
import com.vaadin.data.validator.BigIntegerRangeValidator;
-public class TestBigIntegerRangeValidator extends TestCase {
+public class BigIntegerRangeValidatorTest extends TestCase {
private BigIntegerRangeValidator cleanValidator = new BigIntegerRangeValidator(
"no values", null, null);
diff --git a/server/tests/src/com/vaadin/tests/data/validator/TestByteRangeValidator.java b/server/tests/src/com/vaadin/tests/data/validator/ByteRangeValidatorTest.java
index 6fac06c31b..03f35fe1bb 100644
--- a/server/tests/src/com/vaadin/tests/data/validator/TestByteRangeValidator.java
+++ b/server/tests/src/com/vaadin/tests/data/validator/ByteRangeValidatorTest.java
@@ -4,7 +4,7 @@ import junit.framework.TestCase;
import com.vaadin.data.validator.ByteRangeValidator;
-public class TestByteRangeValidator extends TestCase {
+public class ByteRangeValidatorTest extends TestCase {
private ByteRangeValidator cleanValidator = new ByteRangeValidator(
"no values", null, null);
diff --git a/server/tests/src/com/vaadin/tests/data/validator/TestCompositeValidator.java b/server/tests/src/com/vaadin/tests/data/validator/CompositeValidatorTest.java
index 1d69c77a3d..8199419b67 100644
--- a/server/tests/src/com/vaadin/tests/data/validator/TestCompositeValidator.java
+++ b/server/tests/src/com/vaadin/tests/data/validator/CompositeValidatorTest.java
@@ -8,7 +8,7 @@ import com.vaadin.data.validator.CompositeValidator.CombinationMode;
import com.vaadin.data.validator.EmailValidator;
import com.vaadin.data.validator.RegexpValidator;
-public class TestCompositeValidator extends TestCase {
+public class CompositeValidatorTest extends TestCase {
CompositeValidator and = new CompositeValidator(CombinationMode.AND,
"One validator not valid");
diff --git a/server/tests/src/com/vaadin/tests/data/validator/TestDateRangeValidator.java b/server/tests/src/com/vaadin/tests/data/validator/DateRangeValidatorTest.java
index cdb1e12545..7bb3e20160 100644
--- a/server/tests/src/com/vaadin/tests/data/validator/TestDateRangeValidator.java
+++ b/server/tests/src/com/vaadin/tests/data/validator/DateRangeValidatorTest.java
@@ -10,7 +10,7 @@ import junit.framework.TestCase;
import com.vaadin.data.validator.DateRangeValidator;
import com.vaadin.shared.ui.datefield.Resolution;
-public class TestDateRangeValidator extends TestCase {
+public class DateRangeValidatorTest extends TestCase {
Calendar startDate = new GregorianCalendar(TimeZone.getTimeZone("GMT"),
Locale.ENGLISH);
Calendar endDate = new GregorianCalendar(TimeZone.getTimeZone("GMT"),
diff --git a/server/tests/src/com/vaadin/tests/data/validator/TestDoubleRangeValidator.java b/server/tests/src/com/vaadin/tests/data/validator/DoubleRangeValidatorTest.java
index 3fe61e13f4..b096937bd2 100644
--- a/server/tests/src/com/vaadin/tests/data/validator/TestDoubleRangeValidator.java
+++ b/server/tests/src/com/vaadin/tests/data/validator/DoubleRangeValidatorTest.java
@@ -4,7 +4,7 @@ import junit.framework.TestCase;
import com.vaadin.data.validator.DoubleRangeValidator;
-public class TestDoubleRangeValidator extends TestCase {
+public class DoubleRangeValidatorTest extends TestCase {
private DoubleRangeValidator cleanValidator = new DoubleRangeValidator(
"no values", null, null);
diff --git a/server/tests/src/com/vaadin/tests/data/validator/TestEmailValidator.java b/server/tests/src/com/vaadin/tests/data/validator/EmailValidatorTest.java
index 7644b4738c..19fe9e6580 100644
--- a/server/tests/src/com/vaadin/tests/data/validator/TestEmailValidator.java
+++ b/server/tests/src/com/vaadin/tests/data/validator/EmailValidatorTest.java
@@ -4,7 +4,7 @@ import junit.framework.TestCase;
import com.vaadin.data.validator.EmailValidator;
-public class TestEmailValidator extends TestCase {
+public class EmailValidatorTest extends TestCase {
private EmailValidator validator = new EmailValidator("Error");
diff --git a/server/tests/src/com/vaadin/tests/data/validator/TestFloatRangeValidator.java b/server/tests/src/com/vaadin/tests/data/validator/FloatRangeValidatorTest.java
index 8de363e3d7..c5a07be43f 100644
--- a/server/tests/src/com/vaadin/tests/data/validator/TestFloatRangeValidator.java
+++ b/server/tests/src/com/vaadin/tests/data/validator/FloatRangeValidatorTest.java
@@ -4,7 +4,7 @@ import junit.framework.TestCase;
import com.vaadin.data.validator.FloatRangeValidator;
-public class TestFloatRangeValidator extends TestCase {
+public class FloatRangeValidatorTest extends TestCase {
private FloatRangeValidator cleanValidator = new FloatRangeValidator(
"no values", null, null);
diff --git a/server/tests/src/com/vaadin/tests/data/validator/TestIntegerRangeValidator.java b/server/tests/src/com/vaadin/tests/data/validator/IntegerRangeValidatorTest.java
index 864fc61ab6..5e64d0107e 100644
--- a/server/tests/src/com/vaadin/tests/data/validator/TestIntegerRangeValidator.java
+++ b/server/tests/src/com/vaadin/tests/data/validator/IntegerRangeValidatorTest.java
@@ -4,7 +4,7 @@ import junit.framework.TestCase;
import com.vaadin.data.validator.IntegerRangeValidator;
-public class TestIntegerRangeValidator extends TestCase {
+public class IntegerRangeValidatorTest extends TestCase {
private IntegerRangeValidator cleanValidator = new IntegerRangeValidator(
"no values", null, null);
diff --git a/server/tests/src/com/vaadin/tests/data/validator/TestLongRangeValidator.java b/server/tests/src/com/vaadin/tests/data/validator/LongRangeValidatorTest.java
index a9aeb6b67b..440e9c3fd2 100644
--- a/server/tests/src/com/vaadin/tests/data/validator/TestLongRangeValidator.java
+++ b/server/tests/src/com/vaadin/tests/data/validator/LongRangeValidatorTest.java
@@ -4,7 +4,7 @@ import junit.framework.TestCase;
import com.vaadin.data.validator.LongRangeValidator;
-public class TestLongRangeValidator extends TestCase {
+public class LongRangeValidatorTest extends TestCase {
private LongRangeValidator cleanValidator = new LongRangeValidator(
"no values", null, null);
diff --git a/server/tests/src/com/vaadin/tests/data/validator/TestNullValidator.java b/server/tests/src/com/vaadin/tests/data/validator/NullValidatorTest.java
index 0a0634ec8f..1e08ea7e2c 100644
--- a/server/tests/src/com/vaadin/tests/data/validator/TestNullValidator.java
+++ b/server/tests/src/com/vaadin/tests/data/validator/NullValidatorTest.java
@@ -5,7 +5,7 @@ import junit.framework.TestCase;
import com.vaadin.data.Validator;
import com.vaadin.data.validator.NullValidator;
-public class TestNullValidator extends TestCase {
+public class NullValidatorTest extends TestCase {
NullValidator notNull = new NullValidator("Null not accepted", false);
NullValidator onlyNull = new NullValidator("Only null accepted", true);
diff --git a/server/tests/src/com/vaadin/tests/data/validator/TestRegexpValidator.java b/server/tests/src/com/vaadin/tests/data/validator/RegexpValidatorTest.java
index bcff224451..2a62d23059 100644
--- a/server/tests/src/com/vaadin/tests/data/validator/TestRegexpValidator.java
+++ b/server/tests/src/com/vaadin/tests/data/validator/RegexpValidatorTest.java
@@ -4,7 +4,7 @@ import junit.framework.TestCase;
import com.vaadin.data.validator.RegexpValidator;
-public class TestRegexpValidator extends TestCase {
+public class RegexpValidatorTest extends TestCase {
private RegexpValidator completeValidator = new RegexpValidator("pattern",
true, "Complete match validator error");
diff --git a/server/tests/src/com/vaadin/tests/data/validator/TestShortRangeValidator.java b/server/tests/src/com/vaadin/tests/data/validator/ShortRangeValidatorTest.java
index b522abb179..69d22eb91e 100644
--- a/server/tests/src/com/vaadin/tests/data/validator/TestShortRangeValidator.java
+++ b/server/tests/src/com/vaadin/tests/data/validator/ShortRangeValidatorTest.java
@@ -4,7 +4,7 @@ import junit.framework.TestCase;
import com.vaadin.data.validator.ShortRangeValidator;
-public class TestShortRangeValidator extends TestCase {
+public class ShortRangeValidatorTest extends TestCase {
private ShortRangeValidator cleanValidator = new ShortRangeValidator(
"no values", null, null);
diff --git a/server/tests/src/com/vaadin/tests/data/validator/TestStringLengthValidator.java b/server/tests/src/com/vaadin/tests/data/validator/StringLengthValidatorTest.java
index 6b4b2b0d51..5f12367f09 100644
--- a/server/tests/src/com/vaadin/tests/data/validator/TestStringLengthValidator.java
+++ b/server/tests/src/com/vaadin/tests/data/validator/StringLengthValidatorTest.java
@@ -4,7 +4,7 @@ import junit.framework.TestCase;
import com.vaadin.data.validator.StringLengthValidator;
-public class TestStringLengthValidator extends TestCase {
+public class StringLengthValidatorTest extends TestCase {
private StringLengthValidator validator = new StringLengthValidator("Error");
private StringLengthValidator validatorNoNull = new StringLengthValidator(
diff --git a/server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.java b/server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.java
index ce80d98324..6eccaf6a2c 100644
--- a/server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.java
+++ b/server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.java
@@ -15,12 +15,9 @@
*/
package com.vaadin.tests.design;
-import org.junit.Ignore;
-
import com.vaadin.ui.CssLayout;
import com.vaadin.ui.declarative.Design;
-@Ignore
public class DesignReadInConstructor extends CssLayout {
public DesignReadInConstructor() {
diff --git a/server/tests/src/com/vaadin/tests/design/InvalidLayoutTemplate.java b/server/tests/src/com/vaadin/tests/design/InvalidLayoutTemplate.java
index bdfa4b47cc..8a2dec5a35 100644
--- a/server/tests/src/com/vaadin/tests/design/InvalidLayoutTemplate.java
+++ b/server/tests/src/com/vaadin/tests/design/InvalidLayoutTemplate.java
@@ -15,8 +15,6 @@
*/
package com.vaadin.tests.design;
-import org.junit.Ignore;
-
import com.vaadin.ui.Button;
import com.vaadin.ui.NativeButton;
import com.vaadin.ui.TextField;
@@ -27,7 +25,6 @@ import com.vaadin.ui.VerticalLayout;
* @since
* @author Vaadin Ltd
*/
-@Ignore
public class InvalidLayoutTemplate extends VerticalLayout {
private NativeButton firstButton;
private NativeButton secondButton;
diff --git a/server/tests/src/com/vaadin/tests/design/LayoutTemplate.java b/server/tests/src/com/vaadin/tests/design/LayoutTemplate.java
index 95f30fb728..fdfddf5c08 100644
--- a/server/tests/src/com/vaadin/tests/design/LayoutTemplate.java
+++ b/server/tests/src/com/vaadin/tests/design/LayoutTemplate.java
@@ -15,8 +15,6 @@
*/
package com.vaadin.tests.design;
-import org.junit.Ignore;
-
import com.vaadin.ui.Button;
import com.vaadin.ui.NativeButton;
import com.vaadin.ui.VerticalLayout;
@@ -27,7 +25,6 @@ import com.vaadin.ui.VerticalLayout;
* @since
* @author Vaadin Ltd
*/
-@Ignore
public class LayoutTemplate extends VerticalLayout {
private NativeButton firstButton; // assigned based on local id
private NativeButton secondButton; // assigned based on id
diff --git a/server/tests/src/com/vaadin/tests/design/TestLocale.java b/server/tests/src/com/vaadin/tests/design/LocaleTest.java
index a4100f7d71..939080fbbc 100644
--- a/server/tests/src/com/vaadin/tests/design/TestLocale.java
+++ b/server/tests/src/com/vaadin/tests/design/LocaleTest.java
@@ -32,6 +32,11 @@ import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.declarative.Design;
import com.vaadin.ui.declarative.DesignContext;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
/**
* Tests the handling of the locale property in parsing and html generation.
@@ -39,10 +44,10 @@ import com.vaadin.ui.declarative.DesignContext;
* @since
* @author Vaadin Ltd
*/
-public class TestLocale extends TestCase {
+public class LocaleTest {
DesignContext ctx;
- @Override
+ @Before
public void setUp() {
ctx = new DesignContext();
}
@@ -52,6 +57,7 @@ public class TestLocale extends TestCase {
* constructed, the result only contains locale attributes for a component
* if its locale differs from that of its parent.
*/
+ @Test
public void testHtmlGeneration() {
// create a component hierarchy
VerticalLayout vLayout = new VerticalLayout();
@@ -130,6 +136,7 @@ public class TestLocale extends TestCase {
* Checks that the locale of a component is set when the html element
* corresponding to the component specifies a locale.
*/
+ @Test
public void testParsing() {
// create an html document
Document doc = new Document("");
diff --git a/server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java b/server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java
index 4f3f205631..5f901cd746 100644
--- a/server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java
+++ b/server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java
@@ -22,26 +22,28 @@ import junit.framework.TestCase;
import com.vaadin.ui.declarative.Design;
import com.vaadin.ui.declarative.DesignContext;
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.*;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
/**
* Just top level test case that contains all synchronizable components
*
* @author Vaadin Ltd
*/
-public class ParseAllSupportedComponentsTest extends TestCase {
+public class ParseAllSupportedComponentsTest {
+
+ @Test
+ public void allComponentsAreParsed() throws FileNotFoundException {
+ DesignContext ctx = Design
+ .read(new FileInputStream(
+ "server/tests/src/com/vaadin/tests/design/all-components.html"),
+ null);
- public void testParsing() {
- try {
- DesignContext ctx = Design
- .read(new FileInputStream(
- "server/tests/src/com/vaadin/tests/design/all-components.html"),
- null);
- assertNotNull("The returned design context can not be null", ctx);
- assertNotNull("the component root can not be null",
- ctx.getRootComponent());
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- fail("Template parsing threw exception");
- }
+ assertThat(ctx, is(not(nullValue())));
+ assertThat(ctx.getRootComponent(), is(not(nullValue())));
}
}
diff --git a/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java b/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java
index c517b0e5e2..70376c79f8 100644
--- a/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java
+++ b/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java
@@ -22,25 +22,27 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
-import junit.framework.TestCase;
-
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.nodes.Node;
+import org.junit.Before;
import org.junit.Test;
-import com.vaadin.ui.Button;
import com.vaadin.ui.Component;
import com.vaadin.ui.HorizontalLayout;
-import com.vaadin.ui.Label;
-import com.vaadin.ui.NativeButton;
import com.vaadin.ui.TextArea;
import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.declarative.Design;
import com.vaadin.ui.declarative.DesignContext;
import com.vaadin.ui.declarative.DesignException;
+import org.junit.rules.ExpectedException;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.*;
/**
* A test for checking that parsing a layout preserves the IDs and the mapping
@@ -50,45 +52,62 @@ import com.vaadin.ui.declarative.DesignException;
* @since
* @author Vaadin Ltd
*/
-public class ParseLayoutTest extends TestCase {
+public class ParseLayoutTest {
// The context is used for accessing the created component hierarchy.
private DesignContext ctx;
- @Override
- protected void setUp() throws Exception {
- super.setUp();
+ @Before
+ public void setUp() throws Exception {
ctx = Design
.read(new FileInputStream(
"server/tests/src/com/vaadin/tests/design/testFile.html"),
null);
}
- /*
- * Checks the component hierarchy created by parsing a design. Also checks
- * that components can be found by id and caption.
- */
@Test
- public void testGettingByIDAndCaption() throws FileNotFoundException {
- findElements(ctx);
- checkHierarchy(ctx);
- }
-
- /*
- * Check that captions, ids and package mappings are preserved when an html
- * tree is generated from a DesignContext containing the component root of
- * the component hierarchy. Done by writing the design to a string and then
- * reading it back, not using the original context information after reading
- * the written design. The mapping from prefixes to package names is checked
- * directly from the html tree.
- */
+ public void buttonWithIdIsParsed() {
+ Component button = ctx.getComponentByLocalId("firstButton");
+
+ assertThat(ctx.getComponentByCaption("Native click me"), is(button));
+ assertThat(button.getCaption(), is("Native click me"));
+ }
+
@Test
- public void testThatSerializationPreservesProperties() throws IOException {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- Design.write(ctx, out);
- ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
- DesignContext newContext = Design.read(in, null);
- findElements(newContext);
- checkHierarchy(newContext);
+ public void buttonWithIdAndLocalIdIsParsed() {
+ Component button = ctx.getComponentById("secondButton");
+
+ assertThat(ctx.getComponentByCaption("Another button"), is(button));
+ assertThat(ctx.getComponentByLocalId("localID"), is(button));
+ assertThat(button.getCaption(), is("Another button"));
+ }
+
+ @Test
+ public void buttonWithoutIdsIsParsed() {
+ assertThat(ctx.getComponentByCaption("Yet another button"),
+ is(not(nullValue())));
+ }
+
+ @Test
+ public void serializationPreservesProperties() throws IOException {
+ ByteArrayOutputStream out = serializeDesign(ctx);
+ ctx = deSerializeDesign(out);
+
+ assertButtonProperties();
+ }
+
+ @Test
+ public void serializationPreservesHierarchy() throws IOException {
+ ByteArrayOutputStream out = serializeDesign(ctx);
+ ctx = deSerializeDesign(out);
+
+ assertComponentHierarchy();
+ }
+
+ @Test
+ public void designIsSerializedWithCorrectPrefixesAndPackageNames()
+ throws IOException {
+ ByteArrayOutputStream out = serializeDesign(ctx);
+
// Check the mapping from prefixes to package names using the html tree
String[] expectedPrefixes = { "my" };
String[] expectedPackageNames = { "com.addon.mypackage" };
@@ -114,13 +133,26 @@ public class ParseLayoutTest extends TestCase {
index);
}
- /*
- * Check that the field binding works if root instance with member fields is
- * passed to the LayoutHandler
- *
- * @throws IOException
- */
- public void testFieldBinding() throws IOException {
+ private DesignContext deSerializeDesign(ByteArrayOutputStream out) {
+ ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
+ return Design.read(in, null);
+ }
+
+ private ByteArrayOutputStream serializeDesign(DesignContext context) throws IOException {
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ Design.write(context, out);
+
+ return out;
+ }
+
+ private void assertButtonProperties() {
+ buttonWithIdAndLocalIdIsParsed();
+ buttonWithIdIsParsed();
+ buttonWithoutIdsIsParsed();
+ }
+
+ @Test
+ public void fieldsAreBoundToATemplate() throws IOException {
LayoutTemplate template = new LayoutTemplate();
InputStream htmlFile = new FileInputStream(
"server/tests/src/com/vaadin/tests/design/testFile.html");
@@ -132,92 +164,59 @@ public class ParseLayoutTest extends TestCase {
assertEquals("Native click me", template.getFirstButton().getCaption());
}
- /*
- * Check that the field binding fails if some of the fields in the root
- * instance were not bound
- *
- * @throws IOException
- */
- public void testUnboundFields() throws IOException {
+ @Test(expected = DesignException.class)
+ public void fieldsCannotBeBoundToAnInvalidTemplate() throws IOException {
InvalidLayoutTemplate template = new InvalidLayoutTemplate();
InputStream htmlFile = new FileInputStream(
"server/tests/src/com/vaadin/tests/design/testFile.html");
- try {
- Design.read(htmlFile, template);
- // we are expecting an exception
- fail();
- } catch (DesignException e) {
- // expected
- }
+
+ Design.read(htmlFile, template);
}
- /*
- * Checks that the correct components occur in the correct order in the
- * component hierarchy rooted at context.getComponentRoot().
- */
- private void checkHierarchy(DesignContext context) {
- Component root = context.getRootComponent();
+ @Test
+ public void rootHasCorrectComponents() {
+ Component root = ctx.getRootComponent();
+
VerticalLayout vlayout = (VerticalLayout) root;
- int numComponents = vlayout.getComponentCount();
- assertEquals("Wrong number of child components", 3, numComponents);
- // Check the contents of the horizontal layout
+ assertThat(vlayout.getComponentCount(), is(3));
+ }
+
+ @Test
+ public void rootChildHasCorrectComponents() {
+ Component root = ctx.getRootComponent();
+ VerticalLayout vlayout = (VerticalLayout) root;
HorizontalLayout hlayout = (HorizontalLayout) vlayout.getComponent(0);
- int numHLComponents = hlayout.getComponentCount();
- assertEquals(5, numHLComponents);
- Label label = (Label) hlayout.getComponent(0);
- assertEquals("Wrong caption.", "FooBar", label.getCaption());
- NativeButton nb = (NativeButton) hlayout.getComponent(1);
- assertEquals("Wrong caption.", "Native click me", nb.getCaption());
- nb = (NativeButton) hlayout.getComponent(2);
- assertEquals("Wrong caption.", "Another button", nb.getCaption());
- nb = (NativeButton) hlayout.getComponent(3);
- assertEquals("Wrong caption.", "Yet another button", nb.getCaption());
- Button b = (Button) hlayout.getComponent(4);
- assertEquals("Wrong caption.", "Click me", b.getCaption());
- assertEquals("Wrong width.", 150f, b.getWidth());
+
+ assertThat(hlayout.getComponentCount(), is(5));
+ assertThat(hlayout.getComponent(0).getCaption(), is("FooBar"));
+ assertThat(hlayout.getComponent(1).getCaption(), is("Native click me"));
+ assertThat(hlayout.getComponent(2).getCaption(), is("Another button"));
+ assertThat(hlayout.getComponent(3).getCaption(), is("Yet another button"));
+ assertThat(hlayout.getComponent(4).getCaption(), is("Click me"));
+ assertThat(hlayout.getComponent(4).getWidth(), is(150f));
// Check the remaining two components of the vertical layout
+ assertTextField(vlayout);
+ assertTextArea(vlayout);
+ }
+
+ private void assertComponentHierarchy() {
+ rootHasCorrectComponents();
+ rootChildHasCorrectComponents();
+ }
+
+ private void assertTextField(VerticalLayout vlayout) {
TextField tf = (TextField) vlayout.getComponent(1);
- assertEquals("Wrong caption.", "Text input", tf.getCaption());
- TextArea ta = (TextArea) vlayout.getComponent(2);
- assertEquals("Wrong caption.", "Text area", ta.getCaption());
- assertEquals("Wrong width.", 300f, ta.getWidth());
- assertEquals("Wrong height.", 200f, ta.getHeight());
- }
-
- /*
- * Checks that the correct elements are found using a local id, a global id
- * or a caption.
- */
- private void findElements(DesignContext designContext) {
- NativeButton firstButton = (NativeButton) designContext
- .getComponentByLocalId("firstButton");
- NativeButton firstButton_2 = (NativeButton) designContext
- .getComponentByCaption("Native click me");
- NativeButton secondButton = (NativeButton) designContext
- .getComponentById("secondButton");
- NativeButton secondButton_2 = (NativeButton) designContext
- .getComponentByLocalId("localID");
- NativeButton secondButton_3 = (NativeButton) designContext
- .getComponentByCaption("Another button");
- NativeButton thirdButton = (NativeButton) designContext
- .getComponentByCaption("Yet another button");
- // Check that the first button was found using both identifiers.
- assertEquals("The found buttons should be identical but they are not.",
- firstButton, firstButton_2);
- assertTrue("The found button element is incorrect.", firstButton
- .getCaption().equals("Native click me"));
- // Check that the second button was found using all three identifiers.
- assertEquals("The found buttons should be identical but they are not.",
- secondButton, secondButton_2);
- assertEquals("The found buttons should be identical but they are not.",
- secondButton_2, secondButton_3);
- assertTrue("The found button is incorrect.", secondButton.getCaption()
- .equals("Another button"));
- // Check that the third button was found by caption.
- assertTrue("The found button is incorrect.", thirdButton.getCaption()
- .equals("Yet another button"));
+
+ assertThat(tf.getCaption(), is("Text input"));
}
+ private void assertTextArea(VerticalLayout layout) {
+ TextArea ta = (TextArea) layout.getComponent(2);
+
+ assertThat(ta.getCaption(), is("Text area"));
+ assertThat(ta.getWidth(), is(300f));
+ assertThat(ta.getHeight(), is(200f));
+ }
}
diff --git a/server/tests/src/com/vaadin/tests/design/designroot/DesignWithAnnotation.java b/server/tests/src/com/vaadin/tests/design/designroot/DesignWithAnnotation.java
index 70809cb694..ef9de9dcb0 100644
--- a/server/tests/src/com/vaadin/tests/design/designroot/DesignWithAnnotation.java
+++ b/server/tests/src/com/vaadin/tests/design/designroot/DesignWithAnnotation.java
@@ -15,8 +15,6 @@
*/
package com.vaadin.tests.design.designroot;
-import org.junit.Ignore;
-
import com.vaadin.annotations.DesignRoot;
import com.vaadin.ui.Button;
import com.vaadin.ui.Label;
@@ -24,7 +22,6 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.declarative.Design;
@DesignRoot("DesignWithEmptyAnnotation.html")
-@Ignore
public class DesignWithAnnotation extends VerticalLayout {
public Button ok;
diff --git a/server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.java b/server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.java
index f6fb928e75..55fd571ee2 100644
--- a/server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.java
+++ b/server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.java
@@ -15,8 +15,6 @@
*/
package com.vaadin.tests.design.designroot;
-import org.junit.Ignore;
-
import com.vaadin.annotations.DesignRoot;
import com.vaadin.ui.Button;
import com.vaadin.ui.Label;
@@ -24,7 +22,6 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.declarative.Design;
@DesignRoot
-@Ignore
public class DesignWithEmptyAnnotation extends VerticalLayout {
protected Button ok;
diff --git a/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java b/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java
index 14e4269e80..d47b4540df 100644
--- a/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java
+++ b/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java
@@ -15,11 +15,8 @@
*/
package com.vaadin.tests.design.designroot;
-import org.junit.Ignore;
-
import com.vaadin.ui.TextField;
-@Ignore
public class ExtendedDesignWithAnnotation extends DesignWithAnnotation {
private TextField customField = new TextField();
diff --git a/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java b/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java
index 22865b098c..ea513f6d3e 100644
--- a/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java
+++ b/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java
@@ -15,14 +15,11 @@
*/
package com.vaadin.tests.design.designroot;
-import org.junit.Ignore;
-
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.Notification;
import com.vaadin.ui.TextField;
-@Ignore
public class ExtendedDesignWithEmptyAnnotation extends
DesignWithEmptyAnnotation {
diff --git a/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotationUI.java b/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotationUI.java
index 34f517d25d..1d0e8de4eb 100644
--- a/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotationUI.java
+++ b/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotationUI.java
@@ -15,12 +15,9 @@
*/
package com.vaadin.tests.design.designroot;
-import org.junit.Ignore;
-
import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.UI;
-@Ignore
public class ExtendedDesignWithEmptyAnnotationUI extends UI {
@Override
diff --git a/server/tests/src/com/vaadin/tests/design/nested/MyChildDesign.java b/server/tests/src/com/vaadin/tests/design/nested/MyChildDesign.java
index e85c0aca5f..3b0d80c32c 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/MyChildDesign.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/MyChildDesign.java
@@ -15,8 +15,6 @@
*/
package com.vaadin.tests.design.nested;
-import org.junit.Ignore;
-
import com.vaadin.annotations.DesignRoot;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
@@ -27,7 +25,6 @@ import com.vaadin.ui.declarative.Design;
*
* @author Vaadin Ltd
*/
-@Ignore
@DesignRoot("mychilddesign.html")
public class MyChildDesign extends HorizontalLayout {
public Label childLabel;
diff --git a/server/tests/src/com/vaadin/tests/design/nested/MyChildDesignCustomComponent.java b/server/tests/src/com/vaadin/tests/design/nested/MyChildDesignCustomComponent.java
index 94e34baea2..8402224cf9 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/MyChildDesignCustomComponent.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/MyChildDesignCustomComponent.java
@@ -15,11 +15,8 @@
*/
package com.vaadin.tests.design.nested;
-import org.junit.Ignore;
-
import com.vaadin.ui.Button;
-@Ignore
public class MyChildDesignCustomComponent extends Button {
}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/MyDesignRoot.java b/server/tests/src/com/vaadin/tests/design/nested/MyDesignRoot.java
index 5727322ce3..abde002ef8 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/MyDesignRoot.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/MyDesignRoot.java
@@ -15,8 +15,6 @@
*/
package com.vaadin.tests.design.nested;
-import org.junit.Ignore;
-
import com.vaadin.annotations.DesignRoot;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.declarative.Design;
@@ -26,7 +24,6 @@ import com.vaadin.ui.declarative.Design;
*
* @author Vaadin Ltd
*/
-@Ignore
@DesignRoot("mydesignroot.html")
public class MyDesignRoot extends VerticalLayout {
// should be assigned automatically
diff --git a/server/tests/src/com/vaadin/tests/design/nested/MyExtendedChildDesign.java b/server/tests/src/com/vaadin/tests/design/nested/MyExtendedChildDesign.java
index 2012e4ec14..579fdfb869 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/MyExtendedChildDesign.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/MyExtendedChildDesign.java
@@ -15,9 +15,6 @@
*/
package com.vaadin.tests.design.nested;
-import org.junit.Ignore;
-
-@Ignore
public class MyExtendedChildDesign extends MyChildDesign {
public MyExtendedChildDesign() {
super();
diff --git a/server/tests/src/com/vaadin/tests/design/nested/TestNestedCustomLayouts.java b/server/tests/src/com/vaadin/tests/design/nested/NestedCustomLayoutsTest.java
index c71ccca85b..beaa9519cb 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/TestNestedCustomLayouts.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/NestedCustomLayoutsTest.java
@@ -15,29 +15,20 @@
*/
package com.vaadin.tests.design.nested;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-
-import junit.framework.TestCase;
-
+import com.vaadin.tests.design.nested.customlayouts.*;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.declarative.Design;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.junit.Test;
-import com.vaadin.tests.design.nested.customlayouts.CustomAbsoluteLayout;
-import com.vaadin.tests.design.nested.customlayouts.CustomAccordion;
-import com.vaadin.tests.design.nested.customlayouts.CustomCssLayout;
-import com.vaadin.tests.design.nested.customlayouts.CustomFormLayout;
-import com.vaadin.tests.design.nested.customlayouts.CustomGridLayout;
-import com.vaadin.tests.design.nested.customlayouts.CustomHorizontalLayout;
-import com.vaadin.tests.design.nested.customlayouts.CustomHorizontalSplitPanel;
-import com.vaadin.tests.design.nested.customlayouts.CustomPanel;
-import com.vaadin.tests.design.nested.customlayouts.CustomTabSheet;
-import com.vaadin.tests.design.nested.customlayouts.CustomVerticalLayout;
-import com.vaadin.tests.design.nested.customlayouts.CustomVerticalSplitPanel;
-import com.vaadin.ui.VerticalLayout;
-import com.vaadin.ui.declarative.Design;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.greaterThan;
/**
* Test case for nested custom layouts. The children of the custom layouts must
@@ -45,12 +36,24 @@ import com.vaadin.ui.declarative.Design;
*
* @author Vaadin Ltd
*/
-public class TestNestedCustomLayouts extends TestCase {
+public class NestedCustomLayoutsTest {
private static String PACKAGE_MAPPING = "com_vaadin_tests_design_nested_customlayouts:com.vaadin.tests.design.nested.customlayouts";
@Test
public void testNestedLayouts() throws IOException {
+ VerticalLayout rootLayout = createRootLayout();
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+
+ Design.write(rootLayout, out);
+ Document doc = Jsoup.parse(out.toString("UTF-8"));
+
+ assertThat(doc.head().child(0).attr("name"), is("package-mapping"));
+ assertThat(doc.head().child(0).attr("content"), is(PACKAGE_MAPPING));
+ assertChildrenCount(doc);
+ }
+
+ private VerticalLayout createRootLayout() {
VerticalLayout rootLayout = new VerticalLayout();
rootLayout.addComponent(new CustomAbsoluteLayout());
rootLayout.addComponent(new CustomAccordion());
@@ -63,18 +66,17 @@ public class TestNestedCustomLayouts extends TestCase {
rootLayout.addComponent(new CustomTabSheet());
rootLayout.addComponent(new CustomVerticalLayout());
rootLayout.addComponent(new CustomVerticalSplitPanel());
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- Design.write(rootLayout, out);
- Document doc = Jsoup.parse(out.toString("UTF-8"));
- assertEquals("package-mapping", doc.head().child(0).attr("name"));
- assertEquals(PACKAGE_MAPPING, doc.head().child(0).attr("content"));
+
+ return rootLayout;
+ }
+
+ private void assertChildrenCount(Document doc) {
Element rootNode = doc.body().child(0);
- assertTrue("Root node must have children",
- rootNode.children().size() > 0);
+ assertThat(rootNode.children().size(), greaterThan(0));
+
for (Element child : rootNode.children()) {
// make sure that the nested custom layouts do not render children
- assertEquals("Child nodes must not have children", 0, child
- .children().size());
+ assertThat(child.children().size(), is(0));
}
}
}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/ReadNestedTemplatesTest.java b/server/tests/src/com/vaadin/tests/design/nested/ReadNestedTemplatesTest.java
new file mode 100644
index 0000000000..dc95306cd3
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/nested/ReadNestedTemplatesTest.java
@@ -0,0 +1,71 @@
+/*
+ * 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.design.nested;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.core.IsNot.not;
+import static org.junit.Assert.*;
+
+/**
+ * Test case for reading nested templates
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+public class ReadNestedTemplatesTest {
+
+ private MyDesignRoot root;
+
+ @Before
+ public void setUp() {
+ root = new MyDesignRoot();
+ }
+
+ @Test
+ public void rootContainsOneChild() {
+ assertThat(root.getComponentCount(), is(1));
+ assertThat(root.iterator().next(),
+ instanceOf(MyExtendedChildDesign.class));
+ }
+
+ @Test
+ public void rootContainsTwoGrandChildren() {
+ assertThat(root.childDesign.getComponentCount(), is(2));
+ }
+
+ @Test
+ public void childComponentIsNotNull() {
+ assertThat(root.childDesign, is(not(nullValue())));
+ }
+
+ @Test
+ public void childLabelIsNotNull() {
+ assertThat(root.childDesign.childLabel, is(not(nullValue())));
+ assertThat(root.childDesign.childLabel.getValue(), is("test content"));
+ }
+
+ @Test
+ public void childCustomComponentsIsNotNull() {
+ assertThat(root.childDesign.childCustomComponent, is(not(nullValue())));
+ assertThat(root.childDesign.childCustomComponent.getCaption(),
+ is("custom content"));
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/TestReadNestedTemplates.java b/server/tests/src/com/vaadin/tests/design/nested/TestReadNestedTemplates.java
deleted file mode 100644
index c1483adc8a..0000000000
--- a/server/tests/src/com/vaadin/tests/design/nested/TestReadNestedTemplates.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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.design.nested;
-
-import junit.framework.TestCase;
-
-/**
- * Test case for reading nested templates
- *
- * @since
- * @author Vaadin Ltd
- */
-public class TestReadNestedTemplates extends TestCase {
-
- private MyDesignRoot root;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- root = new MyDesignRoot();
- }
-
- public void testChildren() {
- assertEquals("The root layout must contain one child", 1,
- root.getComponentCount());
- assertTrue(root.iterator().next() instanceof MyExtendedChildDesign);
- }
-
- public void testGrandChildren() {
- assertEquals("The root layout must have two grandchildren", 2,
- root.childDesign.getComponentCount());
- }
-
- public void testRootComponentFields() {
- assertNotNull("The child component must not be null", root.childDesign);
- }
-
- public void testChildComponentFields() {
- assertNotNull("Grandchildren must not be null",
- root.childDesign.childLabel);
- assertNotNull("Grandchildren must not be null",
- root.childDesign.childCustomComponent);
- assertEquals("child label caption must be read", "test content",
- root.childDesign.childLabel.getValue());
- assertEquals("child custom component caption must be read",
- "custom content",
- root.childDesign.childCustomComponent.getCaption());
- }
-}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/TestWriteNestedTemplates.java b/server/tests/src/com/vaadin/tests/design/nested/WriteNestedTemplatesTest.java
index 7fe63baa73..344cd94ac2 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/TestWriteNestedTemplates.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/WriteNestedTemplatesTest.java
@@ -15,13 +15,15 @@
*/
package com.vaadin.tests.design.nested;
-import junit.framework.TestCase;
-
+import com.vaadin.ui.declarative.DesignContext;
import org.jsoup.nodes.Attributes;
import org.jsoup.nodes.Element;
import org.jsoup.parser.Tag;
+import org.junit.Before;
+import org.junit.Test;
-import com.vaadin.ui.declarative.DesignContext;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.*;
/**
*
@@ -29,21 +31,29 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestWriteNestedTemplates extends TestCase {
+public class WriteNestedTemplatesTest {
private MyDesignRoot root;
private Element design;
- @Override
- protected void setUp() throws Exception {
- super.setUp();
+ @Before
+ public void setUp() {
root = new MyDesignRoot();
design = createDesign();
+ }
+
+ private Element createDesign() {
+ Element design = new Element(Tag.valueOf("v-vertical-layout"), "",
+ new Attributes());
+
DesignContext designContext = new DesignContext();
designContext.setRootComponent(root);
root.writeDesign(design, designContext);
+
+ return design;
}
+ @Test
public void testChildRendered() {
assertEquals("Root layout must have one child", 1, design.children()
.size());
@@ -51,39 +61,29 @@ public class TestWriteNestedTemplates extends TestCase {
design.child(0).tagName());
}
- public void testRootCaptionWritten() {
- assertTrue("Root layout caption must be written",
- design.hasAttr("caption"));
- assertEquals("Root layout caption must be written", "root caption",
- design.attr("caption"));
+ @Test
+ public void rootCaptionIsWritten() {
+ assertTrue(design.hasAttr("caption"));
+ assertThat(design.attr("caption"), is("root caption"));
}
- public void testChildCaptionWritten() {
- assertTrue("Child design caption must be written", design.child(0)
- .hasAttr("caption"));
- assertEquals("Child design caption must be written", "child caption",
- design.child(0).attr("caption"));
+ @Test
+ public void childCaptionIsWritten() {
+ assertTrue(design.child(0).hasAttr("caption"));
+ assertThat(design.child(0).attr("caption"), is("child caption"));
}
// The default caption is read from child template
- public void testDefaultCaptionShouldNotBeWritten() {
- design = createDesign();
+ @Test
+ public void defaultCaptionIsNotOverwritten() {
root.childDesign.setCaption("Default caption for child design");
- DesignContext designContext = new DesignContext();
- designContext.setRootComponent(root);
- root.writeDesign(design, designContext);
- assertFalse("Default caption must not be written", design.child(0)
- .hasAttr("caption"));
- }
+ design = createDesign();
- public void testChildDesignChildrenNotWrittenInRootTemplate() {
- assertEquals(
- "Children of the child template must not be written to root template",
- 0, design.child(0).children().size());
+ assertFalse(design.child(0).hasAttr("caption"));
}
- private Element createDesign() {
- return new Element(Tag.valueOf("v-vertical-layout"), "",
- new Attributes());
+ @Test
+ public void childDesignChildrenIsNotWrittenInRootTemplate() {
+ assertThat(design.child(0).children().size(), is(0));
}
}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAbsoluteLayout.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAbsoluteLayout.java
index ed2b27215e..8eef3b07a6 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAbsoluteLayout.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAbsoluteLayout.java
@@ -15,15 +15,12 @@
*/
package com.vaadin.tests.design.nested.customlayouts;
-import org.junit.Ignore;
-
import com.vaadin.ui.AbsoluteLayout;
import com.vaadin.ui.Label;
/**
* @author Vaadin Ltd
*/
-@Ignore
public class CustomAbsoluteLayout extends AbsoluteLayout {
public CustomAbsoluteLayout() {
this.addComponent(new Label());
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAccordion.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAccordion.java
index 7d45917520..93606f296c 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAccordion.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAccordion.java
@@ -15,15 +15,12 @@
*/
package com.vaadin.tests.design.nested.customlayouts;
-import org.junit.Ignore;
-
import com.vaadin.ui.Accordion;
import com.vaadin.ui.Label;
/**
* @author Vaadin Ltd
*/
-@Ignore
public class CustomAccordion extends Accordion {
public CustomAccordion() {
addComponent(new Label());
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomCssLayout.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomCssLayout.java
index 328a025e01..b2aaa2c015 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomCssLayout.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomCssLayout.java
@@ -15,15 +15,12 @@
*/
package com.vaadin.tests.design.nested.customlayouts;
-import org.junit.Ignore;
-
import com.vaadin.ui.CssLayout;
import com.vaadin.ui.Label;
/**
* @author Vaadin Ltd
*/
-@Ignore
public class CustomCssLayout extends CssLayout {
public CustomCssLayout() {
this.addComponent(new Label());
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomFormLayout.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomFormLayout.java
index 179b195926..66ac083c0d 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomFormLayout.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomFormLayout.java
@@ -15,15 +15,12 @@
*/
package com.vaadin.tests.design.nested.customlayouts;
-import org.junit.Ignore;
-
import com.vaadin.ui.FormLayout;
import com.vaadin.ui.Label;
/**
* @author Vaadin Ltd
*/
-@Ignore
public class CustomFormLayout extends FormLayout {
public CustomFormLayout() {
this.addComponent(new Label());
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomGridLayout.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomGridLayout.java
index 0b3b90ca1f..1059ea0e14 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomGridLayout.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomGridLayout.java
@@ -15,15 +15,12 @@
*/
package com.vaadin.tests.design.nested.customlayouts;
-import org.junit.Ignore;
-
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
/**
* @author Vaadin Ltd
*/
-@Ignore
public class CustomGridLayout extends GridLayout {
public CustomGridLayout() {
this.addComponent(new Label());
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalLayout.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalLayout.java
index b742f7c629..482a9feb95 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalLayout.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalLayout.java
@@ -15,15 +15,12 @@
*/
package com.vaadin.tests.design.nested.customlayouts;
-import org.junit.Ignore;
-
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
/**
* @author Vaadin Ltd
*/
-@Ignore
public class CustomHorizontalLayout extends HorizontalLayout {
public CustomHorizontalLayout() {
this.addComponent(new Label());
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalSplitPanel.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalSplitPanel.java
index deeb311858..21c8745796 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalSplitPanel.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalSplitPanel.java
@@ -15,15 +15,12 @@
*/
package com.vaadin.tests.design.nested.customlayouts;
-import org.junit.Ignore;
-
import com.vaadin.ui.HorizontalSplitPanel;
import com.vaadin.ui.Label;
/**
* @author Vaadin Ltd
*/
-@Ignore
public class CustomHorizontalSplitPanel extends HorizontalSplitPanel {
public CustomHorizontalSplitPanel() {
addComponent(new Label());
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomPanel.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomPanel.java
index fa7827bdfd..5841fbcfee 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomPanel.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomPanel.java
@@ -15,15 +15,12 @@
*/
package com.vaadin.tests.design.nested.customlayouts;
-import org.junit.Ignore;
-
import com.vaadin.ui.Label;
import com.vaadin.ui.Panel;
/**
* @author Vaadin Ltd
*/
-@Ignore
public class CustomPanel extends Panel {
public CustomPanel() {
setContent(new Label());
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomTabSheet.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomTabSheet.java
index 6298b67727..128de7de1f 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomTabSheet.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomTabSheet.java
@@ -15,15 +15,12 @@
*/
package com.vaadin.tests.design.nested.customlayouts;
-import org.junit.Ignore;
-
import com.vaadin.ui.Label;
import com.vaadin.ui.TabSheet;
/**
* @author Vaadin Ltd
*/
-@Ignore
public class CustomTabSheet extends TabSheet {
public CustomTabSheet() {
addComponent(new Label());
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalLayout.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalLayout.java
index 7859ae0227..3bc8fba7de 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalLayout.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalLayout.java
@@ -15,15 +15,12 @@
*/
package com.vaadin.tests.design.nested.customlayouts;
-import org.junit.Ignore;
-
import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;
/**
* @author Vaadin Ltd
*/
-@Ignore
public class CustomVerticalLayout extends VerticalLayout {
public CustomVerticalLayout() {
this.addComponent(new Label());
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalSplitPanel.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalSplitPanel.java
index f6eb460c1b..486d71ea75 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalSplitPanel.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalSplitPanel.java
@@ -15,15 +15,12 @@
*/
package com.vaadin.tests.design.nested.customlayouts;
-import org.junit.Ignore;
-
import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalSplitPanel;
/**
* @author Vaadin Ltd
*/
-@Ignore
public class CustomVerticalSplitPanel extends VerticalSplitPanel {
public CustomVerticalSplitPanel() {
addComponent(new Label());
diff --git a/server/tests/src/com/vaadin/tests/server/TestAbstractBeanContainerListeners.java b/server/tests/src/com/vaadin/tests/server/AbstractBeanContainerListenersTest.java
index 0d8433d1c6..b9b4f8025d 100644
--- a/server/tests/src/com/vaadin/tests/server/TestAbstractBeanContainerListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/AbstractBeanContainerListenersTest.java
@@ -3,10 +3,10 @@ package com.vaadin.tests.server;
import com.vaadin.data.Container.PropertySetChangeEvent;
import com.vaadin.data.Container.PropertySetChangeListener;
import com.vaadin.data.util.BeanItemContainer;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
-public class TestAbstractBeanContainerListeners extends
- AbstractListenerMethodsTest {
+public class AbstractBeanContainerListenersTest extends
+ AbstractListenerMethodsTestBase {
public void testPropertySetChangeListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(BeanItemContainer.class,
PropertySetChangeEvent.class, PropertySetChangeListener.class,
diff --git a/server/tests/src/com/vaadin/tests/server/TestAbstractContainerListeners.java b/server/tests/src/com/vaadin/tests/server/AbstractContainerListenersTest.java
index b63e4f809a..a5c7dc3ab2 100644
--- a/server/tests/src/com/vaadin/tests/server/TestAbstractContainerListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/AbstractContainerListenersTest.java
@@ -5,9 +5,9 @@ import com.vaadin.data.Container.ItemSetChangeListener;
import com.vaadin.data.Container.PropertySetChangeEvent;
import com.vaadin.data.Container.PropertySetChangeListener;
import com.vaadin.data.util.IndexedContainer;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
-public class TestAbstractContainerListeners extends AbstractListenerMethodsTest {
+public class AbstractContainerListenersTest extends AbstractListenerMethodsTestBase {
public void testItemSetChangeListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(IndexedContainer.class,
diff --git a/server/tests/src/com/vaadin/tests/server/TestAbstractInMemoryContainerListeners.java b/server/tests/src/com/vaadin/tests/server/AbstractInMemoryContainerListenersTest.java
index a8e2a4aa2a..072998b8e1 100644
--- a/server/tests/src/com/vaadin/tests/server/TestAbstractInMemoryContainerListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/AbstractInMemoryContainerListenersTest.java
@@ -3,10 +3,10 @@ package com.vaadin.tests.server;
import com.vaadin.data.Container.ItemSetChangeEvent;
import com.vaadin.data.Container.ItemSetChangeListener;
import com.vaadin.data.util.IndexedContainer;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
-public class TestAbstractInMemoryContainerListeners extends
- AbstractListenerMethodsTest {
+public class AbstractInMemoryContainerListenersTest extends
+ AbstractListenerMethodsTestBase {
public void testItemSetChangeListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(IndexedContainer.class,
ItemSetChangeEvent.class, ItemSetChangeListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/TestAbstractPropertyListeners.java b/server/tests/src/com/vaadin/tests/server/AbstractPropertyListenersTest.java
index a1d01d1930..28e6f7e0a5 100644
--- a/server/tests/src/com/vaadin/tests/server/TestAbstractPropertyListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/AbstractPropertyListenersTest.java
@@ -6,9 +6,9 @@ import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.data.Property.ValueChangeListener;
import com.vaadin.data.util.AbstractProperty;
import com.vaadin.data.util.ObjectProperty;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
-public class TestAbstractPropertyListeners extends AbstractListenerMethodsTest {
+public class AbstractPropertyListenersTest extends AbstractListenerMethodsTestBase {
public void testValueChangeListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(AbstractProperty.class,
ValueChangeEvent.class, ValueChangeListener.class,
diff --git a/server/tests/src/com/vaadin/tests/server/TestAssertionsEnabled.java b/server/tests/src/com/vaadin/tests/server/AssertionsEnabledTest.java
index 7e120cb9dd..087a7fb0f5 100644
--- a/server/tests/src/com/vaadin/tests/server/TestAssertionsEnabled.java
+++ b/server/tests/src/com/vaadin/tests/server/AssertionsEnabledTest.java
@@ -18,7 +18,7 @@ package com.vaadin.tests.server;
import junit.framework.TestCase;
-public class TestAssertionsEnabled extends TestCase {
+public class AssertionsEnabledTest extends TestCase {
public void testAssertionsEnabled() {
boolean assertFailed = false;
try {
diff --git a/server/tests/src/com/vaadin/tests/server/TestAtmosphereVersion.java b/server/tests/src/com/vaadin/tests/server/AtmosphereVersionTest.java
index 3d37022b81..90a0283cda 100644
--- a/server/tests/src/com/vaadin/tests/server/TestAtmosphereVersion.java
+++ b/server/tests/src/com/vaadin/tests/server/AtmosphereVersionTest.java
@@ -6,7 +6,7 @@ import org.atmosphere.util.Version;
import com.vaadin.server.Constants;
-public class TestAtmosphereVersion extends TestCase {
+public class AtmosphereVersionTest extends TestCase {
/**
* Test that the atmosphere version constant matches the version on our
* classpath
diff --git a/server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java b/server/tests/src/com/vaadin/tests/server/ClassesSerializableTest.java
index 83269ede28..6e7b778f78 100644
--- a/server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java
+++ b/server/tests/src/com/vaadin/tests/server/ClassesSerializableTest.java
@@ -19,7 +19,7 @@ import junit.framework.TestCase;
import org.junit.Ignore;
import org.junit.Test;
-public class TestClassesSerializable extends TestCase {
+public class ClassesSerializableTest extends TestCase {
/**
* JARs that will be scanned for classes to test, in addition to classpath
@@ -63,6 +63,10 @@ public class TestClassesSerializable extends TestCase {
"com\\.vaadin\\.buildhelpers.*", //
"com\\.vaadin\\.util\\.ReflectTools.*", //
"com\\.vaadin\\.data\\.util\\.ReflectTools.*", //
+ "com\\.vaadin\\.data\\.util.BeanItemContainerGenerator.*",
+ "com\\.vaadin\\.data\\.util\\.sqlcontainer\\.connection\\.MockInitialContextFactory",
+ "com\\.vaadin\\.data\\.util\\.sqlcontainer\\.DataGenerator",
+ "com\\.vaadin\\.data\\.util\\.sqlcontainer\\.FreeformQueryUtil",
"com\\.vaadin\\.sass.*", //
"com\\.vaadin\\.testbench.*", //
"com\\.vaadin\\.util\\.CurrentInstance\\$1", //
@@ -149,11 +153,6 @@ public class TestClassesSerializable extends TestCase {
}
private boolean isTestClass(Class<?> cls) {
- // @Ignore is used on test util classes
- if (cls.isAnnotationPresent(Ignore.class)) {
- return true;
- }
-
if (cls.getEnclosingClass() != null
&& isTestClass(cls.getEnclosingClass())) {
return true;
diff --git a/server/tests/src/com/vaadin/tests/server/TestClientMethodSerialization.java b/server/tests/src/com/vaadin/tests/server/ClientMethodSerializationTest.java
index ad70024af4..da6bc76a0f 100644
--- a/server/tests/src/com/vaadin/tests/server/TestClientMethodSerialization.java
+++ b/server/tests/src/com/vaadin/tests/server/ClientMethodSerializationTest.java
@@ -33,18 +33,18 @@ import elemental.json.Json;
import elemental.json.JsonArray;
import elemental.json.impl.JsonUtil;
-public class TestClientMethodSerialization extends TestCase {
+public class ClientMethodSerializationTest extends TestCase {
private static final Method JAVASCRIPT_CALLBACK_METHOD = ReflectTools
.findMethod(JavaScriptCallbackRpc.class, "call", String.class,
JsonArray.class);
private static final Method BASIC_PARAMS_CALL_METHOD = ReflectTools
- .findMethod(TestClientMethodSerialization.class,
+ .findMethod(ClientMethodSerializationTest.class,
"basicParamsMethodForTesting", String.class, Integer.class);
private static final Method NO_PARAMS_CALL_METHOD = ReflectTools
- .findMethod(TestClientMethodSerialization.class,
+ .findMethod(ClientMethodSerializationTest.class,
"noParamsMethodForTesting");
public void basicParamsMethodForTesting(String stringParam,
@@ -71,7 +71,8 @@ public class TestClientMethodSerialization extends TestCase {
ClientMethodInvocation copy = (ClientMethodInvocation) serializeAndDeserialize(original);
JsonArray copyArray = (JsonArray) copy.getParameters()[1];
- assertEquals(JsonUtil.stringify(originalArray), JsonUtil.stringify(copyArray));
+ assertEquals(JsonUtil.stringify(originalArray),
+ JsonUtil.stringify(copyArray));
}
public void testClientMethodSerialization_WithBasicParams_NoChanges()
diff --git a/server/tests/src/com/vaadin/tests/server/CsrfTokenMissingTestServer.java b/server/tests/src/com/vaadin/tests/server/CsrfTokenMissingTest.java
index b127ffe7e5..18fbf70a2a 100644
--- a/server/tests/src/com/vaadin/tests/server/CsrfTokenMissingTestServer.java
+++ b/server/tests/src/com/vaadin/tests/server/CsrfTokenMissingTest.java
@@ -47,7 +47,7 @@ import elemental.json.JsonException;
* @since
* @author Vaadin Ltd
*/
-public class CsrfTokenMissingTestServer {
+public class CsrfTokenMissingTest {
// Dummy fields just to run the test.
private VaadinServlet mockServlet;
@@ -185,7 +185,7 @@ public class CsrfTokenMissingTestServer {
}
private static Logger LOGGER = Logger
- .getLogger(CsrfTokenMissingTestServer.class.getName());
+ .getLogger(CsrfTokenMissingTest.class.getName());
static {
LOGGER.setLevel(Level.ALL);
}
diff --git a/server/tests/src/com/vaadin/tests/server/TestEventRouter.java b/server/tests/src/com/vaadin/tests/server/EventRouterTest.java
index a8f5039042..67f39d301d 100644
--- a/server/tests/src/com/vaadin/tests/server/TestEventRouter.java
+++ b/server/tests/src/com/vaadin/tests/server/EventRouterTest.java
@@ -6,7 +6,7 @@ import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.data.Property.ValueChangeListener;
import com.vaadin.ui.TextField;
-public class TestEventRouter extends TestCase {
+public class EventRouterTest extends TestCase {
int innerListenerCalls = 0;
diff --git a/server/tests/src/com/vaadin/tests/server/TestFileTypeResolver.java b/server/tests/src/com/vaadin/tests/server/FileTypeResolverTest.java
index 413926c89a..3c68e86afa 100644
--- a/server/tests/src/com/vaadin/tests/server/TestFileTypeResolver.java
+++ b/server/tests/src/com/vaadin/tests/server/FileTypeResolverTest.java
@@ -6,7 +6,7 @@ import junit.framework.TestCase;
import com.vaadin.util.FileTypeResolver;
-public class TestFileTypeResolver extends TestCase {
+public class FileTypeResolverTest extends TestCase {
private static final String FLASH_MIME_TYPE = "application/x-shockwave-flash";
private static final String TEXT_MIME_TYPE = "text/plain";
diff --git a/server/tests/src/com/vaadin/tests/server/IndexedContainerListeners.java b/server/tests/src/com/vaadin/tests/server/IndexedContainerListenersTest.java
index 8334c7f183..2e1fa83540 100644
--- a/server/tests/src/com/vaadin/tests/server/IndexedContainerListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/IndexedContainerListenersTest.java
@@ -5,9 +5,9 @@ import com.vaadin.data.Container.PropertySetChangeListener;
import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.data.Property.ValueChangeListener;
import com.vaadin.data.util.IndexedContainer;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
-public class IndexedContainerListeners extends AbstractListenerMethodsTest {
+public class IndexedContainerListenersTest extends AbstractListenerMethodsTestBase {
public void testValueChangeListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(IndexedContainer.class,
ValueChangeEvent.class, ValueChangeListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/TestKeyMapper.java b/server/tests/src/com/vaadin/tests/server/KeyMapperTest.java
index 1c1f9624c8..d632e65c9f 100644
--- a/server/tests/src/com/vaadin/tests/server/TestKeyMapper.java
+++ b/server/tests/src/com/vaadin/tests/server/KeyMapperTest.java
@@ -7,7 +7,7 @@ import junit.framework.TestCase;
import com.vaadin.server.KeyMapper;
-public class TestKeyMapper extends TestCase {
+public class KeyMapperTest extends TestCase {
public void testAdd() {
KeyMapper<Object> mapper = new KeyMapper<Object>();
diff --git a/server/tests/src/com/vaadin/tests/server/TestMimeTypes.java b/server/tests/src/com/vaadin/tests/server/MimeTypesTest.java
index 12e5b09632..36007fae17 100644
--- a/server/tests/src/com/vaadin/tests/server/TestMimeTypes.java
+++ b/server/tests/src/com/vaadin/tests/server/MimeTypesTest.java
@@ -5,7 +5,7 @@ import junit.framework.TestCase;
import com.vaadin.server.ClassResource;
import com.vaadin.ui.Embedded;
-public class TestMimeTypes extends TestCase {
+public class MimeTypesTest extends TestCase {
public void testEmbeddedPDF() {
Embedded e = new Embedded("A pdf", new ClassResource("file.pddf"));
diff --git a/server/tests/src/com/vaadin/tests/server/TestPropertyFormatter.java b/server/tests/src/com/vaadin/tests/server/PropertyFormatterTest.java
index b47a2953ce..6563556a4e 100644
--- a/server/tests/src/com/vaadin/tests/server/TestPropertyFormatter.java
+++ b/server/tests/src/com/vaadin/tests/server/PropertyFormatterTest.java
@@ -10,7 +10,7 @@ import com.vaadin.data.util.ObjectProperty;
import com.vaadin.data.util.PropertyFormatter;
@SuppressWarnings("unchecked")
-public class TestPropertyFormatter extends TestCase {
+public class PropertyFormatterTest extends TestCase {
class TestFormatter extends PropertyFormatter {
diff --git a/server/tests/src/com/vaadin/tests/server/PropertysetItemListeners.java b/server/tests/src/com/vaadin/tests/server/PropertysetItemListenersTest.java
index d493f22779..7edaa2826a 100644
--- a/server/tests/src/com/vaadin/tests/server/PropertysetItemListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/PropertysetItemListenersTest.java
@@ -3,9 +3,9 @@ package com.vaadin.tests.server;
import com.vaadin.data.Item.PropertySetChangeEvent;
import com.vaadin.data.Item.PropertySetChangeListener;
import com.vaadin.data.util.PropertysetItem;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
-public class PropertysetItemListeners extends AbstractListenerMethodsTest {
+public class PropertysetItemListenersTest extends AbstractListenerMethodsTestBase {
public void testPropertySetChangeListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(PropertysetItem.class,
PropertySetChangeEvent.class, PropertySetChangeListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/TestSerialization.java b/server/tests/src/com/vaadin/tests/server/SerializationTest.java
index 3c18035dab..4de30e579e 100644
--- a/server/tests/src/com/vaadin/tests/server/TestSerialization.java
+++ b/server/tests/src/com/vaadin/tests/server/SerializationTest.java
@@ -17,7 +17,7 @@ import com.vaadin.data.validator.RegexpValidator;
import com.vaadin.server.VaadinSession;
import com.vaadin.ui.Form;
-public class TestSerialization extends TestCase {
+public class SerializationTest extends TestCase {
public void testValidators() throws Exception {
RegexpValidator validator = new RegexpValidator(".*", "Error");
diff --git a/server/tests/src/com/vaadin/tests/server/TestSimpleMultiPartInputStream.java b/server/tests/src/com/vaadin/tests/server/SimpleMultiPartInputStreamTest.java
index 6907594b5e..04e621d5d2 100644
--- a/server/tests/src/com/vaadin/tests/server/TestSimpleMultiPartInputStream.java
+++ b/server/tests/src/com/vaadin/tests/server/SimpleMultiPartInputStreamTest.java
@@ -9,7 +9,7 @@ import junit.framework.TestCase;
import com.vaadin.server.communication.FileUploadHandler.SimpleMultiPartInputStream;
-public class TestSimpleMultiPartInputStream extends TestCase {
+public class SimpleMultiPartInputStreamTest extends TestCase {
/**
* Check that the output for a given stream until boundary is as expected.
diff --git a/server/tests/src/com/vaadin/tests/server/TestStreamResource.java b/server/tests/src/com/vaadin/tests/server/StreamResourceTest.java
index 0fdcc9e39c..4971f556db 100644
--- a/server/tests/src/com/vaadin/tests/server/TestStreamResource.java
+++ b/server/tests/src/com/vaadin/tests/server/StreamResourceTest.java
@@ -26,7 +26,7 @@ import com.vaadin.server.StreamResource.StreamSource;
*
* @author Vaadin Ltd
*/
-public class TestStreamResource {
+public class StreamResourceTest {
@Test
public void testEqualsWithNullFields() {
diff --git a/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java b/server/tests/src/com/vaadin/tests/server/StreamVariableMappingTest.java
index b2faca1ed6..e15e722199 100644
--- a/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java
+++ b/server/tests/src/com/vaadin/tests/server/StreamVariableMappingTest.java
@@ -17,7 +17,7 @@ import com.vaadin.ui.ConnectorTracker;
import com.vaadin.ui.UI;
import com.vaadin.ui.Upload;
-public class TestStreamVariableMapping extends TestCase {
+public class StreamVariableMappingTest extends TestCase {
private static final String variableName = "myName";
private Upload owner;
diff --git a/server/tests/src/com/vaadin/tests/server/clientconnector/AttachDetachListeners.java b/server/tests/src/com/vaadin/tests/server/clientconnector/AttachDetachListenersTest.java
index bd7053af40..68964dbfd1 100644
--- a/server/tests/src/com/vaadin/tests/server/clientconnector/AttachDetachListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/clientconnector/AttachDetachListenersTest.java
@@ -25,7 +25,7 @@ import com.vaadin.ui.Label;
import com.vaadin.ui.Layout;
import com.vaadin.ui.UI;
-public class AttachDetachListeners {
+public class AttachDetachListenersTest {
private IMocksControl control;
diff --git a/server/tests/src/com/vaadin/tests/server/component/AbstractListenerMethodsTest.java b/server/tests/src/com/vaadin/tests/server/component/AbstractListenerMethodsTestBase.java
index e189ffc77d..ec3754d037 100644
--- a/server/tests/src/com/vaadin/tests/server/component/AbstractListenerMethodsTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/AbstractListenerMethodsTestBase.java
@@ -14,7 +14,7 @@ import org.junit.Assert;
import com.vaadin.tests.VaadinClasses;
import com.vaadin.ui.Component;
-public abstract class AbstractListenerMethodsTest extends TestCase {
+public abstract class AbstractListenerMethodsTestBase extends TestCase {
public static void main(String[] args) {
findAllListenerMethods();
@@ -48,13 +48,13 @@ public abstract class AbstractListenerMethodsTest extends TestCase {
System.out.println("package " + packageName + ";");
System.out.println("import "
- + AbstractListenerMethodsTest.class.getName()
+ + AbstractListenerMethodsTestBase.class.getName()
+ ";");
System.out.println("import " + c.getName() + ";");
System.out.println("public class "
+ c.getSimpleName()
+ "Listeners extends "
- + AbstractListenerMethodsTest.class
+ + AbstractListenerMethodsTestBase.class
.getSimpleName() + " {");
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/TestReadEmptyDesign.java b/server/tests/src/com/vaadin/tests/server/component/ReadEmptyDesignTest.java
index ecd303b678..5cf3b9700e 100644
--- a/server/tests/src/com/vaadin/tests/server/component/TestReadEmptyDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/ReadEmptyDesignTest.java
@@ -34,7 +34,7 @@ import com.vaadin.ui.declarative.DesignException;
* Test cases for checking that reading a design with no elements in the html
* body produces null as the root component.
*/
-public class TestReadEmptyDesign extends TestCase {
+public class ReadEmptyDesignTest extends TestCase {
InputStream is;
@Override
diff --git a/server/tests/src/com/vaadin/tests/server/component/StateGetDoesNotMarkDirty.java b/server/tests/src/com/vaadin/tests/server/component/StateGetDoesNotMarkDirtyTest.java
index 280d638707..da4d8a92d4 100644
--- a/server/tests/src/com/vaadin/tests/server/component/StateGetDoesNotMarkDirty.java
+++ b/server/tests/src/com/vaadin/tests/server/component/StateGetDoesNotMarkDirtyTest.java
@@ -17,7 +17,7 @@ import com.vaadin.ui.ConnectorTracker;
import com.vaadin.ui.Label;
import com.vaadin.ui.UI;
-public class StateGetDoesNotMarkDirty extends TestCase {
+public class StateGetDoesNotMarkDirtyTest extends TestCase {
private Set<String> excludedMethods = new HashSet<String>();
diff --git a/server/tests/src/com/vaadin/tests/server/component/TestWriteEmptyDesign.java b/server/tests/src/com/vaadin/tests/server/component/WriteEmptyDesignTest.java
index b50915f1fd..a535de2b24 100644
--- a/server/tests/src/com/vaadin/tests/server/component/TestWriteEmptyDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/WriteEmptyDesignTest.java
@@ -33,7 +33,7 @@ import com.vaadin.ui.declarative.DesignContext;
* Test cases for checking that writing a component hierarchy with null root
* produces an html document that has no elements in the html body.
*/
-public class TestWriteEmptyDesign extends TestCase {
+public class WriteEmptyDesignTest extends TestCase {
public void testWriteComponent() throws IOException {
OutputStream os = new ByteArrayOutputStream();
diff --git a/server/tests/src/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutListeners.java b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutListenersTest.java
index 7d6db42d1a..062a89ad62 100644
--- a/server/tests/src/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutListenersTest.java
@@ -2,10 +2,10 @@ package com.vaadin.tests.server.component.absolutelayout;
import com.vaadin.event.LayoutEvents.LayoutClickEvent;
import com.vaadin.event.LayoutEvents.LayoutClickListener;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.AbsoluteLayout;
-public class AbsoluteLayoutListeners extends AbstractListenerMethodsTest {
+public class AbsoluteLayoutListenersTest extends AbstractListenerMethodsTestBase {
public void testLayoutClickListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(AbsoluteLayout.class, LayoutClickEvent.class,
LayoutClickListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/absolutelayout/ComponentPosition.java b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/ComponentPositionTest.java
index d76dcffa2f..eac7ff4d8a 100644
--- a/server/tests/src/com/vaadin/tests/server/component/absolutelayout/ComponentPosition.java
+++ b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/ComponentPositionTest.java
@@ -7,7 +7,7 @@ import com.vaadin.server.Sizeable.Unit;
import com.vaadin.ui.AbsoluteLayout;
import com.vaadin.ui.Button;
-public class ComponentPosition extends TestCase {
+public class ComponentPositionTest extends TestCase {
private static final String CSS = "top:7.0px;right:7.0%;bottom:7.0pc;left:7.0em;z-index:7;";
private static final String PARTIAL_CSS = "top:7.0px;left:7.0em;";
diff --git a/server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/ReadDesignTest.java
index f8af0a992e..f17e1ada44 100644
--- a/server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestReadDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/ReadDesignTest.java
@@ -35,7 +35,7 @@ import com.vaadin.ui.declarative.DesignContext;
* @since
* @author Vaadin Ltd
*/
-public class TestReadDesign extends TestCase {
+public class ReadDesignTest extends TestCase {
private AbsoluteLayout root;
diff --git a/server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/WriteDesignTest.java
index 5f42b1fa81..39a2207819 100644
--- a/server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestWriteDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/WriteDesignTest.java
@@ -31,7 +31,7 @@ import com.vaadin.ui.declarative.DesignContext;
* @since
* @author Vaadin Ltd
*/
-public class TestWriteDesign extends TestCase {
+public class WriteDesignTest extends TestCase {
public void testSynchronizeEmptyLayout() {
AbsoluteLayout layout = createTestLayout();
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestAbstractComponentStyleNames.java b/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/AbstractComponentStyleNamesTest.java
index 1903e66f92..18eb79aadc 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestAbstractComponentStyleNames.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/AbstractComponentStyleNamesTest.java
@@ -4,7 +4,7 @@ import junit.framework.TestCase;
import com.vaadin.ui.AbstractComponent;
-public class TestAbstractComponentStyleNames extends TestCase {
+public class AbstractComponentStyleNamesTest extends TestCase {
public void testSetMultiple() {
AbstractComponent component = getComponent();
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/ReadDesignTest.java
index 43a050ba80..79979e03d9 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestReadDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/ReadDesignTest.java
@@ -36,7 +36,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestReadDesign extends TestCase {
+public class ReadDesignTest extends TestCase {
private DesignContext ctx;
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/WriteDesignTest.java
index 7f207a25ae..68b7a46cde 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestWriteDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/WriteDesignTest.java
@@ -42,7 +42,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestWriteDesign extends TestCase {
+public class WriteDesignTest extends TestCase {
private DesignContext ctx;
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractcomponentcontainer/TestAbstractComponentContainerListeners.java b/server/tests/src/com/vaadin/tests/server/component/abstractcomponentcontainer/AbstractComponentContainerListenersTest.java
index 9763354b57..3a2150b700 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractcomponentcontainer/TestAbstractComponentContainerListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractcomponentcontainer/AbstractComponentContainerListenersTest.java
@@ -1,6 +1,6 @@
package com.vaadin.tests.server.component.abstractcomponentcontainer;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.HasComponents.ComponentAttachEvent;
import com.vaadin.ui.HasComponents.ComponentAttachListener;
import com.vaadin.ui.HasComponents.ComponentDetachEvent;
@@ -8,8 +8,8 @@ import com.vaadin.ui.HasComponents.ComponentDetachListener;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.VerticalLayout;
-public class TestAbstractComponentContainerListeners extends
- AbstractListenerMethodsTest {
+public class AbstractComponentContainerListenersTest extends
+ AbstractListenerMethodsTestBase {
public void testComponentDetachListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(HorizontalLayout.class,
ComponentDetachEvent.class, ComponentDetachListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractcomponentcontainer/AddParentAsChild.java b/server/tests/src/com/vaadin/tests/server/component/abstractcomponentcontainer/AddParentAsChildTest.java
index 67e6d09adc..176d178112 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractcomponentcontainer/AddParentAsChild.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractcomponentcontainer/AddParentAsChildTest.java
@@ -30,7 +30,7 @@ import com.vaadin.ui.HasComponents;
*
* @author Vaadin Ltd
*/
-public class AddParentAsChild {
+public class AddParentAsChildTest {
@Test(expected = IllegalArgumentException.class)
public void testAddComponent() {
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValidators.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValidatorsTest.java
index 764446f7aa..61aafe317d 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValidators.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValidatorsTest.java
@@ -8,7 +8,7 @@ import com.vaadin.data.Validator;
import com.vaadin.ui.AbstractField;
import com.vaadin.ui.Field;
-public class AbsFieldValidators extends TestCase {
+public class AbsFieldValidatorsTest extends TestCase {
Field<Object> field = new AbstractField<Object>() {
@Override
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionError.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionErrorTest.java
index 887f1b8ff3..02aa6afe07 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionError.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionErrorTest.java
@@ -14,7 +14,7 @@ import com.vaadin.tests.data.bean.Person;
import com.vaadin.tests.data.bean.Sex;
import com.vaadin.ui.TextField;
-public class AbsFieldValueConversionError extends TestCase {
+public class AbsFieldValueConversionErrorTest extends TestCase {
Person paulaBean = new Person("Paula", "Brilliant", "paula@brilliant.com",
34, Sex.FEMALE, new Address("Paula street 1", 12345, "P-town",
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversions.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionsTest.java
index beb32e7dba..94ff10926f 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversions.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionsTest.java
@@ -21,7 +21,7 @@ import com.vaadin.tests.util.AlwaysLockedVaadinSession;
import com.vaadin.ui.CheckBox;
import com.vaadin.ui.TextField;
-public class AbsFieldValueConversions extends TestCase {
+public class AbsFieldValueConversionsTest extends TestCase {
Person paulaBean = new Person("Paula", "Brilliant", "paula@brilliant.com",
34, Sex.FEMALE, new Address("Paula street 1", 12345, "P-town",
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/TestAbstractFieldListeners.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldListenersTest.java
index 9937bf92d5..def3ceb643 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/TestAbstractFieldListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldListenersTest.java
@@ -4,10 +4,10 @@ import com.vaadin.data.Property.ReadOnlyStatusChangeEvent;
import com.vaadin.data.Property.ReadOnlyStatusChangeListener;
import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.data.Property.ValueChangeListener;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.CheckBox;
-public class TestAbstractFieldListeners extends AbstractListenerMethodsTest {
+public class AbstractFieldListenersTest extends AbstractListenerMethodsTestBase {
public void testReadOnlyStatusChangeListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(CheckBox.class,
ReadOnlyStatusChangeEvent.class,
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/DefaultConverterFactory.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/DefaultConverterFactoryTest.java
index 99397e9e8f..68e198c37a 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/DefaultConverterFactory.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/DefaultConverterFactoryTest.java
@@ -14,7 +14,7 @@ import com.vaadin.tests.data.bean.Sex;
import com.vaadin.tests.util.AlwaysLockedVaadinSession;
import com.vaadin.ui.TextField;
-public class DefaultConverterFactory extends TestCase {
+public class DefaultConverterFactoryTest extends TestCase {
public static class FloatBean {
float f1;
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/ReadDesignTest.java
index dd0e629199..4fa3400af5 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/TestReadDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/ReadDesignTest.java
@@ -31,7 +31,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestReadDesign extends TestCase {
+public class ReadDesignTest extends TestCase {
private DesignContext ctx;
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetachTest.java
index f391d15fb3..f547f2c66b 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetachTest.java
@@ -13,7 +13,7 @@ import com.vaadin.tests.util.AlwaysLockedVaadinSession;
import com.vaadin.ui.AbstractField;
import com.vaadin.ui.UI;
-public class RemoveListenersOnDetach {
+public class RemoveListenersOnDetachTest {
int numValueChanges = 0;
int numReadOnlyChanges = 0;
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/WriteDesignTest.java
index 969713abe6..37ff8cf3aa 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/TestWriteDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/WriteDesignTest.java
@@ -31,7 +31,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestWriteDesign extends TestCase {
+public class WriteDesignTest extends TestCase {
private DesignContext ctx;
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestAbstractOrderedLayoutListeners.java b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutListenersTest.java
index a0b34aca78..e7393e5f7d 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestAbstractOrderedLayoutListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutListenersTest.java
@@ -2,11 +2,11 @@ package com.vaadin.tests.server.component.abstractorderedlayout;
import com.vaadin.event.LayoutEvents.LayoutClickEvent;
import com.vaadin.event.LayoutEvents.LayoutClickListener;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.VerticalLayout;
-public class TestAbstractOrderedLayoutListeners extends
- AbstractListenerMethodsTest {
+public class AbstractOrderedLayoutListenersTest extends
+ AbstractListenerMethodsTestBase {
public void testLayoutClickListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(VerticalLayout.class, LayoutClickEvent.class,
LayoutClickListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/LayoutSettingsOnReplace.java b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/LayoutSettingsOnReplaceTest.java
index fd951f1692..9d1972c232 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/LayoutSettingsOnReplace.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/LayoutSettingsOnReplaceTest.java
@@ -29,7 +29,7 @@ import com.vaadin.ui.Alignment;
* @since 7.2
* @author Vaadin Ltd
*/
-public class LayoutSettingsOnReplace {
+public class LayoutSettingsOnReplaceTest {
@Test
public void testExpandRatio() {
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/ReadDesignTest.java
index 874fbd83b2..b0a2e678c2 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestReadDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/ReadDesignTest.java
@@ -32,7 +32,7 @@ import com.vaadin.ui.declarative.DesignContext;
* @since
* @author Vaadin Ltd
*/
-public class TestReadDesign extends TestCase {
+public class ReadDesignTest extends TestCase {
public void testChildCount() {
VerticalLayout root = createLayout(0f, false);
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/WriteDesignTest.java
index 302cf985bd..96697af3cd 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestWriteDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/WriteDesignTest.java
@@ -32,7 +32,7 @@ import com.vaadin.ui.declarative.DesignContext;
* @since
* @author Vaadin Ltd
*/
-public class TestWriteDesign extends TestCase {
+public class WriteDesignTest extends TestCase {
public void testSynchronizeMargin() {
VerticalLayout layout = new VerticalLayout();
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractselect/TestAbstractSelectListeners.java b/server/tests/src/com/vaadin/tests/server/component/abstractselect/AbstractSelectListenersTest.java
index 75c19b0517..8ec0414e03 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractselect/TestAbstractSelectListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractselect/AbstractSelectListenersTest.java
@@ -4,10 +4,10 @@ import com.vaadin.data.Container.ItemSetChangeEvent;
import com.vaadin.data.Container.ItemSetChangeListener;
import com.vaadin.data.Container.PropertySetChangeEvent;
import com.vaadin.data.Container.PropertySetChangeListener;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.ComboBox;
-public class TestAbstractSelectListeners extends AbstractListenerMethodsTest {
+public class AbstractSelectListenersTest extends AbstractListenerMethodsTestBase {
public void testItemSetChangeListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(ComboBox.class, ItemSetChangeEvent.class,
ItemSetChangeListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/TestRemoveFromParentLocking.java b/server/tests/src/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/RemoveFromParentLockingTest.java
index fd4a1df766..e277d4e075 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/TestRemoveFromParentLocking.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/RemoveFromParentLockingTest.java
@@ -26,7 +26,7 @@ import com.vaadin.server.VaadinSession;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;
-public class TestRemoveFromParentLocking {
+public class RemoveFromParentLockingTest {
private static VerticalLayout createTestComponent() {
VaadinSession session = new VaadinSession(null) {
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/SetParentAsContent.java b/server/tests/src/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/SetParentAsContentTest.java
index dae0e57d02..b84794d58a 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/SetParentAsContent.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/SetParentAsContentTest.java
@@ -29,7 +29,7 @@ import com.vaadin.ui.HasComponents;
*
* @author Vaadin Ltd
*/
-public class SetParentAsContent {
+public class SetParentAsContentTest {
@Test(expected = IllegalArgumentException.class)
public void testSetContent() {
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestAbstractSplitPanelListeners.java b/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelListenersTest.java
index 2b6cdaa6cc..5dd2f406bc 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestAbstractSplitPanelListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelListenersTest.java
@@ -1,12 +1,12 @@
package com.vaadin.tests.server.component.abstractsplitpanel;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.AbstractSplitPanel.SplitterClickEvent;
import com.vaadin.ui.AbstractSplitPanel.SplitterClickListener;
import com.vaadin.ui.HorizontalSplitPanel;
-public class TestAbstractSplitPanelListeners extends
- AbstractListenerMethodsTest {
+public class AbstractSplitPanelListenersTest extends
+ AbstractListenerMethodsTestBase {
public void testSplitterClickListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(HorizontalSplitPanel.class,
SplitterClickEvent.class, SplitterClickListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/ReadDesignTest.java
index db30f05c5f..f3a7e32e96 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestReadDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/ReadDesignTest.java
@@ -38,7 +38,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestReadDesign extends TestCase {
+public class ReadDesignTest extends TestCase {
DesignContext ctx;
@Override
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/WriteDesignTest.java
index 649498c20b..a75fe911f8 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestWriteDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/WriteDesignTest.java
@@ -32,7 +32,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestWriteDesign extends TestCase {
+public class WriteDesignTest extends TestCase {
private DesignContext ctx;
@Override
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestAbstractTextFieldListeners.java b/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldListenersTest.java
index 9868d6ebfd..1b7f4fdce1 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestAbstractTextFieldListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldListenersTest.java
@@ -6,10 +6,10 @@ import com.vaadin.event.FieldEvents.FocusEvent;
import com.vaadin.event.FieldEvents.FocusListener;
import com.vaadin.event.FieldEvents.TextChangeEvent;
import com.vaadin.event.FieldEvents.TextChangeListener;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.TextField;
-public class TestAbstractTextFieldListeners extends AbstractListenerMethodsTest {
+public class AbstractTextFieldListenersTest extends AbstractListenerMethodsTestBase {
public void testTextChangeListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(TextField.class, TextChangeEvent.class,
TextChangeListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/ReadDesignTest.java
index 3b4b6f1f03..2645ce4255 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestReadDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/ReadDesignTest.java
@@ -29,7 +29,7 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* Test case for reading the attributes of the AbstractTextField from design
*/
-public class TestReadDesign extends TestCase {
+public class ReadDesignTest extends TestCase {
private DesignContext ctx;
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/WriteDesignTest.java
index be5c384d3b..9b1129ce14 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestWriteDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/WriteDesignTest.java
@@ -31,7 +31,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestWriteDesign extends TestCase {
+public class WriteDesignTest extends TestCase {
private DesignContext ctx;
diff --git a/server/tests/src/com/vaadin/tests/server/component/button/ButtonClick.java b/server/tests/src/com/vaadin/tests/server/component/button/ButtonClickTest.java
index 3d5fe77f8e..6283ccf6af 100644
--- a/server/tests/src/com/vaadin/tests/server/component/button/ButtonClick.java
+++ b/server/tests/src/com/vaadin/tests/server/component/button/ButtonClickTest.java
@@ -13,7 +13,7 @@ import com.vaadin.ui.UI;
/**
* Tests the public click() method.
*/
-public class ButtonClick {
+public class ButtonClickTest {
private boolean clicked = false;
@Test
diff --git a/server/tests/src/com/vaadin/tests/server/component/button/ButtonListeners.java b/server/tests/src/com/vaadin/tests/server/component/button/ButtonListenersTest.java
index dc37312eea..4478048b12 100644
--- a/server/tests/src/com/vaadin/tests/server/component/button/ButtonListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/button/ButtonListenersTest.java
@@ -4,12 +4,12 @@ import com.vaadin.event.FieldEvents.BlurEvent;
import com.vaadin.event.FieldEvents.BlurListener;
import com.vaadin.event.FieldEvents.FocusEvent;
import com.vaadin.event.FieldEvents.FocusListener;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
-public class ButtonListeners extends AbstractListenerMethodsTest {
+public class ButtonListenersTest extends AbstractListenerMethodsTestBase {
public void testFocusListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(Button.class, FocusEvent.class,
FocusListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/button/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/button/ReadDesignTest.java
index e194232742..0e503b54b8 100644
--- a/server/tests/src/com/vaadin/tests/server/component/button/TestReadDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/button/ReadDesignTest.java
@@ -37,7 +37,7 @@ import com.vaadin.ui.declarative.DesignContext;
* design.
*
*/
-public class TestReadDesign extends TestCase {
+public class ReadDesignTest extends TestCase {
private DesignContext ctx;
diff --git a/server/tests/src/com/vaadin/tests/server/component/button/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/button/WriteDesignTest.java
index dff80769f4..6d553da835 100644
--- a/server/tests/src/com/vaadin/tests/server/component/button/TestWriteDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/button/WriteDesignTest.java
@@ -32,7 +32,7 @@ import com.vaadin.ui.declarative.DesignContext;
* Tests generating html tree nodes corresponding to the contents of a Button
* and a NativeButton.
*/
-public class TestWriteDesign extends TestCase {
+public class WriteDesignTest extends TestCase {
private DesignContext ctx;
diff --git a/server/tests/src/com/vaadin/tests/server/component/calendar/CalendarBasics.java b/server/tests/src/com/vaadin/tests/server/component/calendar/CalendarBasicsTest.java
index 773631642a..95b4aecdb3 100644
--- a/server/tests/src/com/vaadin/tests/server/component/calendar/CalendarBasics.java
+++ b/server/tests/src/com/vaadin/tests/server/component/calendar/CalendarBasicsTest.java
@@ -41,7 +41,7 @@ import com.vaadin.ui.components.calendar.event.CalendarEventProvider;
/**
* Basic API tests for the calendar
*/
-public class CalendarBasics {
+public class CalendarBasicsTest {
@Test
public void testEmptyConstructorInitialization() {
diff --git a/server/tests/src/com/vaadin/tests/server/component/calendar/ContainerDataSource.java b/server/tests/src/com/vaadin/tests/server/component/calendar/ContainerDataSourceTest.java
index 030abc0eb2..8a066497cd 100644
--- a/server/tests/src/com/vaadin/tests/server/component/calendar/ContainerDataSource.java
+++ b/server/tests/src/com/vaadin/tests/server/component/calendar/ContainerDataSourceTest.java
@@ -33,7 +33,7 @@ import com.vaadin.ui.components.calendar.ContainerEventProvider;
import com.vaadin.ui.components.calendar.event.BasicEvent;
import com.vaadin.ui.components.calendar.event.CalendarEvent;
-public class ContainerDataSource extends TestCase {
+public class ContainerDataSourceTest extends TestCase {
private Calendar calendar;
diff --git a/server/tests/src/com/vaadin/tests/server/component/checkbox/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/checkbox/ReadDesignTest.java
index c58b3b6bdd..9456fa4b31 100644
--- a/server/tests/src/com/vaadin/tests/server/component/checkbox/TestReadDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/checkbox/ReadDesignTest.java
@@ -30,7 +30,7 @@ import com.vaadin.ui.declarative.DesignContext;
* Test cases for reading the contents of a Checkbox from a design.
*
*/
-public class TestReadDesign extends TestCase {
+public class ReadDesignTest extends TestCase {
private DesignContext ctx;
diff --git a/server/tests/src/com/vaadin/tests/server/component/checkbox/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/checkbox/WriteDesignTest.java
index d187371db6..4c41f67ac5 100644
--- a/server/tests/src/com/vaadin/tests/server/component/checkbox/TestWriteDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/checkbox/WriteDesignTest.java
@@ -26,7 +26,7 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* Tests generating html tree nodes corresponding to the contents of a Checkbox
*/
-public class TestWriteDesign extends TestCase {
+public class WriteDesignTest extends TestCase {
private DesignContext ctx;
diff --git a/server/tests/src/com/vaadin/tests/server/component/colorpicker/ColorConversions.java b/server/tests/src/com/vaadin/tests/server/component/colorpicker/ColorConversionsTest.java
index 46d72a6ae6..8c05e58b9c 100644
--- a/server/tests/src/com/vaadin/tests/server/component/colorpicker/ColorConversions.java
+++ b/server/tests/src/com/vaadin/tests/server/component/colorpicker/ColorConversionsTest.java
@@ -21,7 +21,7 @@ import org.junit.Test;
import com.vaadin.shared.ui.colorpicker.Color;
-public class ColorConversions {
+public class ColorConversionsTest {
@Test
public void convertHSL2RGB() {
diff --git a/server/tests/src/com/vaadin/tests/server/component/csslayout/CssLayoutListeners.java b/server/tests/src/com/vaadin/tests/server/component/csslayout/CssLayoutListenersTest.java
index ee75d6ed59..e000df593b 100644
--- a/server/tests/src/com/vaadin/tests/server/component/csslayout/CssLayoutListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/csslayout/CssLayoutListenersTest.java
@@ -2,10 +2,10 @@ package com.vaadin.tests.server.component.csslayout;
import com.vaadin.event.LayoutEvents.LayoutClickEvent;
import com.vaadin.event.LayoutEvents.LayoutClickListener;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.CssLayout;
-public class CssLayoutListeners extends AbstractListenerMethodsTest {
+public class CssLayoutListenersTest extends AbstractListenerMethodsTestBase {
public void testLayoutClickListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(CssLayout.class, LayoutClickEvent.class,
LayoutClickListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/csslayout/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/csslayout/ReadDesignTest.java
index bac3dc70eb..5c3517fa56 100644
--- a/server/tests/src/com/vaadin/tests/server/component/csslayout/TestReadDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/csslayout/ReadDesignTest.java
@@ -30,7 +30,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestReadDesign extends TestCase {
+public class ReadDesignTest extends TestCase {
public void testChildCount() {
CssLayout root = createLayout();
diff --git a/server/tests/src/com/vaadin/tests/server/component/csslayout/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/csslayout/WriteDesignTest.java
index d660eb77ec..0fdb1c8335 100644
--- a/server/tests/src/com/vaadin/tests/server/component/csslayout/TestWriteDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/csslayout/WriteDesignTest.java
@@ -30,7 +30,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestWriteDesign extends TestCase {
+public class WriteDesignTest extends TestCase {
public void testSynchronizeEmptyLayout() {
CssLayout layout = new CssLayout();
diff --git a/server/tests/src/com/vaadin/tests/server/component/datefield/DateFieldListeners.java b/server/tests/src/com/vaadin/tests/server/component/datefield/DateFieldListenersTest.java
index 0f4aee35c7..6d774366a9 100644
--- a/server/tests/src/com/vaadin/tests/server/component/datefield/DateFieldListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/datefield/DateFieldListenersTest.java
@@ -4,10 +4,10 @@ import com.vaadin.event.FieldEvents.BlurEvent;
import com.vaadin.event.FieldEvents.BlurListener;
import com.vaadin.event.FieldEvents.FocusEvent;
import com.vaadin.event.FieldEvents.FocusListener;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.DateField;
-public class DateFieldListeners extends AbstractListenerMethodsTest {
+public class DateFieldListenersTest extends AbstractListenerMethodsTestBase {
public void testFocusListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(DateField.class, FocusEvent.class,
FocusListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/embedded/EmbeddedListeners.java b/server/tests/src/com/vaadin/tests/server/component/embedded/EmbeddedListenersTest.java
index 7512f0f499..b41d5e9e13 100644
--- a/server/tests/src/com/vaadin/tests/server/component/embedded/EmbeddedListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/embedded/EmbeddedListenersTest.java
@@ -2,10 +2,10 @@ package com.vaadin.tests.server.component.embedded;
import com.vaadin.event.MouseEvents.ClickEvent;
import com.vaadin.event.MouseEvents.ClickListener;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.Embedded;
-public class EmbeddedListeners extends AbstractListenerMethodsTest {
+public class EmbeddedListenersTest extends AbstractListenerMethodsTestBase {
public void testClickListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(Embedded.class, ClickEvent.class,
ClickListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBinding.java b/server/tests/src/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBindingTest.java
index ea34d8b04e..cb29a84aa8 100644
--- a/server/tests/src/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBinding.java
+++ b/server/tests/src/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBindingTest.java
@@ -10,7 +10,7 @@ import com.vaadin.data.util.PropertysetItem;
import com.vaadin.ui.FormLayout;
import com.vaadin.ui.TextField;
-public class CaseInsensitiveBinding {
+public class CaseInsensitiveBindingTest {
@Test
public void caseInsensitivityAndUnderscoreRemoval() {
diff --git a/server/tests/src/com/vaadin/tests/server/component/fieldgroup/FieldNamedDescription.java b/server/tests/src/com/vaadin/tests/server/component/fieldgroup/FieldNamedDescriptionTest.java
index 033f1458e8..029dcc66a3 100644
--- a/server/tests/src/com/vaadin/tests/server/component/fieldgroup/FieldNamedDescription.java
+++ b/server/tests/src/com/vaadin/tests/server/component/fieldgroup/FieldNamedDescriptionTest.java
@@ -11,7 +11,7 @@ import com.vaadin.data.util.PropertysetItem;
import com.vaadin.ui.FormLayout;
import com.vaadin.ui.TextField;
-public class FieldNamedDescription {
+public class FieldNamedDescriptionTest {
@Test
public void bindReadOnlyPropertyToFieldGroup() {
diff --git a/server/tests/src/com/vaadin/tests/server/component/gridlayout/DefaultAlignment.java b/server/tests/src/com/vaadin/tests/server/component/gridlayout/DefaultAlignmentTest.java
index 244f1f9e45..9b6368474f 100644
--- a/server/tests/src/com/vaadin/tests/server/component/gridlayout/DefaultAlignment.java
+++ b/server/tests/src/com/vaadin/tests/server/component/gridlayout/DefaultAlignmentTest.java
@@ -9,7 +9,7 @@ import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.TextField;
-public class DefaultAlignment {
+public class DefaultAlignmentTest {
private GridLayout gridLayout;
diff --git a/server/tests/src/com/vaadin/tests/server/component/gridlayout/GridLayoutListeners.java b/server/tests/src/com/vaadin/tests/server/component/gridlayout/GridLayoutListenersTest.java
index ce3a9faa65..ed18a24608 100644
--- a/server/tests/src/com/vaadin/tests/server/component/gridlayout/GridLayoutListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/gridlayout/GridLayoutListenersTest.java
@@ -2,10 +2,10 @@ package com.vaadin.tests.server.component.gridlayout;
import com.vaadin.event.LayoutEvents.LayoutClickEvent;
import com.vaadin.event.LayoutEvents.LayoutClickListener;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.GridLayout;
-public class GridLayoutListeners extends AbstractListenerMethodsTest {
+public class GridLayoutListenersTest extends AbstractListenerMethodsTestBase {
public void testLayoutClickListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(GridLayout.class, LayoutClickEvent.class,
LayoutClickListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/label/LabelConverters.java b/server/tests/src/com/vaadin/tests/server/component/label/LabelConvertersTest.java
index e6cecee1bf..7e65e6a044 100644
--- a/server/tests/src/com/vaadin/tests/server/component/label/LabelConverters.java
+++ b/server/tests/src/com/vaadin/tests/server/component/label/LabelConvertersTest.java
@@ -24,7 +24,7 @@ import com.vaadin.tests.data.bean.Person;
import com.vaadin.tests.util.AlwaysLockedVaadinSession;
import com.vaadin.ui.Label;
-public class LabelConverters extends TestCase {
+public class LabelConvertersTest extends TestCase {
public void testLabelSetDataSourceLaterOn() {
Person p = Person.createTestPerson1();
diff --git a/server/tests/src/com/vaadin/tests/server/component/label/LabelListeners.java b/server/tests/src/com/vaadin/tests/server/component/label/LabelListenersTest.java
index 9bb4c53ba2..4287d58d9c 100644
--- a/server/tests/src/com/vaadin/tests/server/component/label/LabelListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/label/LabelListenersTest.java
@@ -10,11 +10,11 @@ import org.easymock.EasyMock;
import com.vaadin.data.Property;
import com.vaadin.data.Property.ValueChangeListener;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.Label;
import com.vaadin.ui.Label.ValueChangeEvent;
-public class LabelListeners extends AbstractListenerMethodsTest {
+public class LabelListenersTest extends AbstractListenerMethodsTestBase {
public void testValueChangeListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(Label.class, ValueChangeEvent.class,
ValueChangeListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/label/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/label/ReadDesignTest.java
index 3e577b5578..9ccaf43398 100644
--- a/server/tests/src/com/vaadin/tests/server/component/label/TestReadDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/label/ReadDesignTest.java
@@ -30,7 +30,7 @@ import com.vaadin.ui.declarative.DesignContext;
* Test case for reading the contents of a Label from a design.
*
*/
-public class TestReadDesign extends TestCase {
+public class ReadDesignTest extends TestCase {
private DesignContext ctx;
diff --git a/server/tests/src/com/vaadin/tests/server/component/label/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/label/WriteDesignTest.java
index 3368a7d22e..3d13767d35 100644
--- a/server/tests/src/com/vaadin/tests/server/component/label/TestWriteDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/label/WriteDesignTest.java
@@ -29,7 +29,7 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* Tests generating an html tree node corresponding to a Label.
*/
-public class TestWriteDesign extends TestCase {
+public class WriteDesignTest extends TestCase {
private DesignContext ctx;
diff --git a/server/tests/src/com/vaadin/tests/server/component/loginform/LoginFormListeners.java b/server/tests/src/com/vaadin/tests/server/component/loginform/LoginFormListenersTest.java
index fd3e02994c..1c06d2652a 100644
--- a/server/tests/src/com/vaadin/tests/server/component/loginform/LoginFormListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/loginform/LoginFormListenersTest.java
@@ -1,11 +1,11 @@
package com.vaadin.tests.server.component.loginform;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.LoginForm;
import com.vaadin.ui.LoginForm.LoginEvent;
import com.vaadin.ui.LoginForm.LoginListener;
-public class LoginFormListeners extends AbstractListenerMethodsTest {
+public class LoginFormListenersTest extends AbstractListenerMethodsTestBase {
public void testLoginListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(LoginForm.class, LoginEvent.class,
LoginListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/menubar/MenuBarIds.java b/server/tests/src/com/vaadin/tests/server/component/menubar/MenuBarIdsTest.java
index f304315ebc..68007bd870 100644
--- a/server/tests/src/com/vaadin/tests/server/component/menubar/MenuBarIds.java
+++ b/server/tests/src/com/vaadin/tests/server/component/menubar/MenuBarIdsTest.java
@@ -9,7 +9,7 @@ import com.vaadin.ui.MenuBar;
import com.vaadin.ui.MenuBar.Command;
import com.vaadin.ui.MenuBar.MenuItem;
-public class MenuBarIds extends TestCase implements Command {
+public class MenuBarIdsTest extends TestCase implements Command {
private MenuItem lastSelectedItem;
private MenuItem menuFile;
diff --git a/server/tests/src/com/vaadin/tests/server/component/optiongroup/OptionGroupListeners.java b/server/tests/src/com/vaadin/tests/server/component/optiongroup/OptionGroupListenersTest.java
index 7eb35c3882..c2dc175c75 100644
--- a/server/tests/src/com/vaadin/tests/server/component/optiongroup/OptionGroupListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/optiongroup/OptionGroupListenersTest.java
@@ -4,10 +4,10 @@ import com.vaadin.event.FieldEvents.BlurEvent;
import com.vaadin.event.FieldEvents.BlurListener;
import com.vaadin.event.FieldEvents.FocusEvent;
import com.vaadin.event.FieldEvents.FocusListener;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.OptionGroup;
-public class OptionGroupListeners extends AbstractListenerMethodsTest {
+public class OptionGroupListenersTest extends AbstractListenerMethodsTestBase {
public void testFocusListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(OptionGroup.class, FocusEvent.class,
FocusListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/orderedlayout/DefaultAlignment.java b/server/tests/src/com/vaadin/tests/server/component/orderedlayout/DefaultAlignmentTest.java
index 9497a13c0a..7560c21adb 100644
--- a/server/tests/src/com/vaadin/tests/server/component/orderedlayout/DefaultAlignment.java
+++ b/server/tests/src/com/vaadin/tests/server/component/orderedlayout/DefaultAlignmentTest.java
@@ -11,7 +11,7 @@ import com.vaadin.ui.Label;
import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
-public class DefaultAlignment {
+public class DefaultAlignmentTest {
private VerticalLayout verticalLayout;
private HorizontalLayout horizontalLayout;
diff --git a/server/tests/src/com/vaadin/tests/server/component/orderedlayout/TestOrderedLayout.java b/server/tests/src/com/vaadin/tests/server/component/orderedlayout/OrderedLayoutTest.java
index 6a9d55d7e4..3b3dfb94d8 100644
--- a/server/tests/src/com/vaadin/tests/server/component/orderedlayout/TestOrderedLayout.java
+++ b/server/tests/src/com/vaadin/tests/server/component/orderedlayout/OrderedLayoutTest.java
@@ -10,7 +10,7 @@ import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;
-public class TestOrderedLayout extends TestCase {
+public class OrderedLayoutTest extends TestCase {
public void testVLIteration() {
testIndexing(new VerticalLayout(), 10);
diff --git a/server/tests/src/com/vaadin/tests/server/component/panel/PanelListeners.java b/server/tests/src/com/vaadin/tests/server/component/panel/PanelListenersTest.java
index 275e90f5d1..929553a682 100644
--- a/server/tests/src/com/vaadin/tests/server/component/panel/PanelListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/panel/PanelListenersTest.java
@@ -2,10 +2,10 @@ package com.vaadin.tests.server.component.panel;
import com.vaadin.event.MouseEvents.ClickEvent;
import com.vaadin.event.MouseEvents.ClickListener;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.Panel;
-public class PanelListeners extends AbstractListenerMethodsTest {
+public class PanelListenersTest extends AbstractListenerMethodsTestBase {
public void testClickListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(Panel.class, ClickEvent.class,
ClickListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/panel/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/panel/ReadDesignTest.java
index 3eb52309a8..41b19c9778 100644
--- a/server/tests/src/com/vaadin/tests/server/component/panel/TestReadDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/panel/ReadDesignTest.java
@@ -30,7 +30,7 @@ import com.vaadin.ui.declarative.DesignException;
*
* @author Vaadin Ltd
*/
-public class TestReadDesign extends TestCase {
+public class ReadDesignTest extends TestCase {
DesignContext ctx;
@Override
diff --git a/server/tests/src/com/vaadin/tests/server/component/panel/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/panel/WriteDesignTest.java
index f81193d511..8b8c6e5e13 100644
--- a/server/tests/src/com/vaadin/tests/server/component/panel/TestWriteDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/panel/WriteDesignTest.java
@@ -30,7 +30,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestWriteDesign extends TestCase {
+public class WriteDesignTest extends TestCase {
Element panelElement;
@Override
diff --git a/server/tests/src/com/vaadin/tests/server/component/popupview/PopupViewListeners.java b/server/tests/src/com/vaadin/tests/server/component/popupview/PopupViewListenersTest.java
index 12a5a0f520..06782818a8 100644
--- a/server/tests/src/com/vaadin/tests/server/component/popupview/PopupViewListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/popupview/PopupViewListenersTest.java
@@ -1,12 +1,12 @@
package com.vaadin.tests.server.component.popupview;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.Label;
import com.vaadin.ui.PopupView;
import com.vaadin.ui.PopupView.PopupVisibilityEvent;
import com.vaadin.ui.PopupView.PopupVisibilityListener;
-public class PopupViewListeners extends AbstractListenerMethodsTest {
+public class PopupViewListenersTest extends AbstractListenerMethodsTestBase {
public void testPopupVisibilityListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(PopupView.class, PopupVisibilityEvent.class,
PopupVisibilityListener.class, new PopupView("", new Label()));
diff --git a/server/tests/src/com/vaadin/tests/server/component/select/SelectListeners.java b/server/tests/src/com/vaadin/tests/server/component/select/SelectListenersTest.java
index 2a1cc0deb0..9a2a5f1f50 100644
--- a/server/tests/src/com/vaadin/tests/server/component/select/SelectListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/select/SelectListenersTest.java
@@ -4,10 +4,10 @@ import com.vaadin.event.FieldEvents.BlurEvent;
import com.vaadin.event.FieldEvents.BlurListener;
import com.vaadin.event.FieldEvents.FocusEvent;
import com.vaadin.event.FieldEvents.FocusListener;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.Select;
-public class SelectListeners extends AbstractListenerMethodsTest {
+public class SelectListenersTest extends AbstractListenerMethodsTestBase {
public void testFocusListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(Select.class, FocusEvent.class,
FocusListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/table/CacheUpdateExceptionCauses.java b/server/tests/src/com/vaadin/tests/server/component/table/CacheUpdateExceptionCausesTest.java
index beb5da0885..03f50c6b5f 100644
--- a/server/tests/src/com/vaadin/tests/server/component/table/CacheUpdateExceptionCauses.java
+++ b/server/tests/src/com/vaadin/tests/server/component/table/CacheUpdateExceptionCausesTest.java
@@ -22,7 +22,7 @@ import org.junit.Test;
import com.vaadin.ui.Table;
import com.vaadin.ui.Table.CacheUpdateException;
-public class CacheUpdateExceptionCauses {
+public class CacheUpdateExceptionCausesTest {
@Test
public void testSingleCauseException() {
Table table = new Table();
diff --git a/server/tests/src/com/vaadin/tests/server/component/table/TestFooter.java b/server/tests/src/com/vaadin/tests/server/component/table/FooterTest.java
index 647d13855b..f9d373e864 100644
--- a/server/tests/src/com/vaadin/tests/server/component/table/TestFooter.java
+++ b/server/tests/src/com/vaadin/tests/server/component/table/FooterTest.java
@@ -11,7 +11,7 @@ import com.vaadin.ui.Table;
* Test case for testing the footer API
*
*/
-public class TestFooter extends TestCase {
+public class FooterTest extends TestCase {
/**
* Tests if setting the footer visibility works properly
diff --git a/server/tests/src/com/vaadin/tests/server/component/table/TestMultipleSelection.java b/server/tests/src/com/vaadin/tests/server/component/table/MultipleSelectionTest.java
index ff80cdb3c3..ceb4c865d2 100644
--- a/server/tests/src/com/vaadin/tests/server/component/table/TestMultipleSelection.java
+++ b/server/tests/src/com/vaadin/tests/server/component/table/MultipleSelectionTest.java
@@ -10,7 +10,7 @@ import com.vaadin.data.util.IndexedContainer;
import com.vaadin.shared.ui.MultiSelectMode;
import com.vaadin.ui.Table;
-public class TestMultipleSelection extends TestCase {
+public class MultipleSelectionTest extends TestCase {
/**
* Tests weather the multiple select mode is set when using Table.set
diff --git a/server/tests/src/com/vaadin/tests/server/component/table/TableColumnAlignments.java b/server/tests/src/com/vaadin/tests/server/component/table/TableColumnAlignmentsTest.java
index 299f9c79d4..5e33ff2f4a 100644
--- a/server/tests/src/com/vaadin/tests/server/component/table/TableColumnAlignments.java
+++ b/server/tests/src/com/vaadin/tests/server/component/table/TableColumnAlignmentsTest.java
@@ -7,12 +7,12 @@ import org.junit.Test;
import com.vaadin.ui.Table;
import com.vaadin.ui.Table.Align;
-public class TableColumnAlignments {
+public class TableColumnAlignmentsTest {
@Test
public void defaultColumnAlignments() {
for (int properties = 0; properties < 10; properties++) {
- Table t = TableGenerator.createTableWithDefaultContainer(
+ Table t = TableGeneratorTest.createTableWithDefaultContainer(
properties, 10);
Object[] expected = new Object[properties];
for (int i = 0; i < properties; i++) {
@@ -26,7 +26,7 @@ public class TableColumnAlignments {
@Test
public void explicitColumnAlignments() {
int properties = 5;
- Table t = TableGenerator
+ Table t = TableGeneratorTest
.createTableWithDefaultContainer(properties, 10);
Align[] explicitAlignments = new Align[] { Align.CENTER, Align.LEFT,
Align.RIGHT, Align.RIGHT, Align.LEFT };
@@ -39,7 +39,7 @@ public class TableColumnAlignments {
@Test
public void invalidColumnAlignmentStrings() {
- Table t = TableGenerator.createTableWithDefaultContainer(3, 7);
+ Table t = TableGeneratorTest.createTableWithDefaultContainer(3, 7);
Align[] defaultAlignments = new Align[] { Align.LEFT, Align.LEFT,
Align.LEFT };
try {
@@ -57,7 +57,7 @@ public class TableColumnAlignments {
@Test
public void columnAlignmentForPropertyNotInContainer() {
- Table t = TableGenerator.createTableWithDefaultContainer(3, 7);
+ Table t = TableGeneratorTest.createTableWithDefaultContainer(3, 7);
Align[] defaultAlignments = new Align[] { Align.LEFT, Align.LEFT,
Align.LEFT };
try {
@@ -81,7 +81,7 @@ public class TableColumnAlignments {
@Test
public void invalidColumnAlignmentsLength() {
- Table t = TableGenerator.createTableWithDefaultContainer(7, 7);
+ Table t = TableGeneratorTest.createTableWithDefaultContainer(7, 7);
Align[] defaultAlignments = new Align[] { Align.LEFT, Align.LEFT,
Align.LEFT, Align.LEFT, Align.LEFT, Align.LEFT, Align.LEFT };
@@ -122,7 +122,7 @@ public class TableColumnAlignments {
@Test
public void explicitColumnAlignmentOneByOne() {
int properties = 5;
- Table t = TableGenerator
+ Table t = TableGeneratorTest
.createTableWithDefaultContainer(properties, 10);
Align[] explicitAlignments = new Align[] { Align.CENTER, Align.LEFT,
Align.RIGHT, Align.RIGHT, Align.LEFT };
diff --git a/server/tests/src/com/vaadin/tests/server/component/table/TableGenerator.java b/server/tests/src/com/vaadin/tests/server/component/table/TableGeneratorTest.java
index 0e63049944..f3c2589f4a 100644
--- a/server/tests/src/com/vaadin/tests/server/component/table/TableGenerator.java
+++ b/server/tests/src/com/vaadin/tests/server/component/table/TableGeneratorTest.java
@@ -5,7 +5,7 @@ import org.junit.Test;
import com.vaadin.data.Item;
import com.vaadin.ui.Table;
-public class TableGenerator {
+public class TableGeneratorTest {
public static Table createTableWithDefaultContainer(int properties,
int items) {
Table t = new Table();
diff --git a/server/tests/src/com/vaadin/tests/server/component/table/TableListeners.java b/server/tests/src/com/vaadin/tests/server/component/table/TableListenersTest.java
index fbe5bb3146..fce514954a 100644
--- a/server/tests/src/com/vaadin/tests/server/component/table/TableListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/table/TableListenersTest.java
@@ -2,7 +2,7 @@ package com.vaadin.tests.server.component.table;
import com.vaadin.event.ItemClickEvent;
import com.vaadin.event.ItemClickEvent.ItemClickListener;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.Table;
import com.vaadin.ui.Table.ColumnReorderEvent;
import com.vaadin.ui.Table.ColumnReorderListener;
@@ -13,7 +13,7 @@ import com.vaadin.ui.Table.FooterClickListener;
import com.vaadin.ui.Table.HeaderClickEvent;
import com.vaadin.ui.Table.HeaderClickListener;
-public class TableListeners extends AbstractListenerMethodsTest {
+public class TableListenersTest extends AbstractListenerMethodsTestBase {
public void testColumnResizeListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(Table.class, ColumnResizeEvent.class,
ColumnResizeListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/table/TablePropertyValueConverter.java b/server/tests/src/com/vaadin/tests/server/component/table/TablePropertyValueConverterTest.java
index 418ca333bc..7fd5bc67f6 100644
--- a/server/tests/src/com/vaadin/tests/server/component/table/TablePropertyValueConverter.java
+++ b/server/tests/src/com/vaadin/tests/server/component/table/TablePropertyValueConverterTest.java
@@ -39,7 +39,7 @@ import com.vaadin.ui.Table;
* @since
* @author Vaadin Ltd
*/
-public class TablePropertyValueConverter extends TestCase {
+public class TablePropertyValueConverterTest extends TestCase {
protected TestableTable table;
protected Collection<?> initialProperties;
diff --git a/server/tests/src/com/vaadin/tests/server/component/table/TableSerialization.java b/server/tests/src/com/vaadin/tests/server/component/table/TableSerializationTest.java
index ee6349093c..3f3c52d6c0 100644
--- a/server/tests/src/com/vaadin/tests/server/component/table/TableSerialization.java
+++ b/server/tests/src/com/vaadin/tests/server/component/table/TableSerializationTest.java
@@ -6,7 +6,7 @@ import org.apache.commons.lang.SerializationUtils;
import com.vaadin.ui.Table;
-public class TableSerialization extends TestCase {
+public class TableSerializationTest extends TestCase {
public void testSerialization() {
Table t = new Table();
diff --git a/server/tests/src/com/vaadin/tests/server/component/table/TableVisibleColumns.java b/server/tests/src/com/vaadin/tests/server/component/table/TableVisibleColumnsTest.java
index ee3eefba05..e4f229590f 100644
--- a/server/tests/src/com/vaadin/tests/server/component/table/TableVisibleColumns.java
+++ b/server/tests/src/com/vaadin/tests/server/component/table/TableVisibleColumnsTest.java
@@ -6,7 +6,7 @@ import org.junit.Test;
import com.vaadin.ui.Table;
-public class TableVisibleColumns {
+public class TableVisibleColumnsTest {
String[] defaultColumns3 = new String[] { "Property 0", "Property 1",
"Property 2" };
@@ -14,7 +14,7 @@ public class TableVisibleColumns {
@Test
public void defaultVisibleColumns() {
for (int properties = 0; properties < 10; properties++) {
- Table t = TableGenerator.createTableWithDefaultContainer(
+ Table t = TableGeneratorTest.createTableWithDefaultContainer(
properties, 10);
Object[] expected = new Object[properties];
for (int i = 0; i < properties; i++) {
@@ -27,7 +27,7 @@ public class TableVisibleColumns {
@Test
public void explicitVisibleColumns() {
- Table t = TableGenerator.createTableWithDefaultContainer(5, 10);
+ Table t = TableGeneratorTest.createTableWithDefaultContainer(5, 10);
Object[] newVisibleColumns = new Object[] { "Property 1", "Property 2" };
t.setVisibleColumns(newVisibleColumns);
assertArrayEquals("Explicit visible columns, 5 properties",
@@ -37,7 +37,7 @@ public class TableVisibleColumns {
@Test
public void invalidVisibleColumnIds() {
- Table t = TableGenerator.createTableWithDefaultContainer(3, 10);
+ Table t = TableGeneratorTest.createTableWithDefaultContainer(3, 10);
try {
t.setVisibleColumns(new Object[] { "a", "Property 2", "Property 3" });
@@ -50,7 +50,7 @@ public class TableVisibleColumns {
@Test
public void duplicateVisibleColumnIds() {
- Table t = TableGenerator.createTableWithDefaultContainer(3, 10);
+ Table t = TableGeneratorTest.createTableWithDefaultContainer(3, 10);
try {
t.setVisibleColumns(new Object[] { "Property 0", "Property 1",
"Property 2", "Property 1" });
@@ -62,7 +62,7 @@ public class TableVisibleColumns {
@Test
public void noVisibleColumns() {
- Table t = TableGenerator.createTableWithDefaultContainer(3, 10);
+ Table t = TableGeneratorTest.createTableWithDefaultContainer(3, 10);
t.setVisibleColumns(new Object[] {});
assertArrayEquals(new Object[] {}, t.getVisibleColumns());
diff --git a/server/tests/src/com/vaadin/tests/server/component/tabsheet/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/tabsheet/ReadDesignTest.java
index f7c4f16cdc..67533c8b11 100644
--- a/server/tests/src/com/vaadin/tests/server/component/tabsheet/TestReadDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/tabsheet/ReadDesignTest.java
@@ -33,7 +33,7 @@ import com.vaadin.ui.declarative.DesignContext;
* @since
* @author Vaadin Ltd
*/
-public class TestReadDesign extends TestCase {
+public class ReadDesignTest extends TestCase {
private TabSheet sheet;
diff --git a/server/tests/src/com/vaadin/tests/server/component/tabsheet/TabSheetListeners.java b/server/tests/src/com/vaadin/tests/server/component/tabsheet/TabSheetListenersTest.java
index 5c01a1c99f..b1acf05d63 100644
--- a/server/tests/src/com/vaadin/tests/server/component/tabsheet/TabSheetListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/tabsheet/TabSheetListenersTest.java
@@ -1,11 +1,11 @@
package com.vaadin.tests.server.component.tabsheet;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.TabSheet.SelectedTabChangeEvent;
import com.vaadin.ui.TabSheet.SelectedTabChangeListener;
-public class TabSheetListeners extends AbstractListenerMethodsTest {
+public class TabSheetListenersTest extends AbstractListenerMethodsTestBase {
public void testSelectedTabChangeListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(TabSheet.class, SelectedTabChangeEvent.class,
SelectedTabChangeListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/tabsheet/TestTabSheet.java b/server/tests/src/com/vaadin/tests/server/component/tabsheet/TabSheetTest.java
index 0ef8ae5a76..29f12fa4b6 100644
--- a/server/tests/src/com/vaadin/tests/server/component/tabsheet/TestTabSheet.java
+++ b/server/tests/src/com/vaadin/tests/server/component/tabsheet/TabSheetTest.java
@@ -14,7 +14,7 @@ import com.vaadin.ui.Label;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.TabSheet.Tab;
-public class TestTabSheet {
+public class TabSheetTest {
@Test
public void addExistingComponent() {
diff --git a/server/tests/src/com/vaadin/tests/server/component/tabsheet/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/tabsheet/WriteDesignTest.java
index a46b33e2d6..ab7ef9977c 100644
--- a/server/tests/src/com/vaadin/tests/server/component/tabsheet/TestWriteDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/tabsheet/WriteDesignTest.java
@@ -33,7 +33,7 @@ import com.vaadin.ui.declarative.DesignContext;
* @since
* @author Vaadin Ltd
*/
-public class TestWriteDesign extends TestCase {
+public class WriteDesignTest extends TestCase {
private TabSheet sheet;
private Element design;
diff --git a/server/tests/src/com/vaadin/tests/server/component/textarea/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/textarea/ReadDesignTest.java
index a31367008a..aad831e91c 100644
--- a/server/tests/src/com/vaadin/tests/server/component/textarea/TestReadDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/textarea/ReadDesignTest.java
@@ -30,7 +30,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestReadDesign extends TestCase {
+public class ReadDesignTest extends TestCase {
private DesignContext ctx;
@Override
diff --git a/server/tests/src/com/vaadin/tests/server/component/textarea/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/textarea/WriteDesignTest.java
index 01b0095fe9..63712eba15 100644
--- a/server/tests/src/com/vaadin/tests/server/component/textarea/TestWriteDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/textarea/WriteDesignTest.java
@@ -30,7 +30,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestWriteDesign extends TestCase {
+public class WriteDesignTest extends TestCase {
private DesignContext ctx;
@Override
diff --git a/server/tests/src/com/vaadin/tests/server/component/textfield/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/textfield/ReadDesignTest.java
index 62cb1a53bc..d3da7fef8b 100644
--- a/server/tests/src/com/vaadin/tests/server/component/textfield/TestReadDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/textfield/ReadDesignTest.java
@@ -30,7 +30,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestReadDesign extends TestCase {
+public class ReadDesignTest extends TestCase {
private DesignContext ctx;
@Override
diff --git a/server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldWithConverterAndValidator.java b/server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldWithConverterAndValidatorTest.java
index cdb001e266..83c45f94db 100644
--- a/server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldWithConverterAndValidator.java
+++ b/server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldWithConverterAndValidatorTest.java
@@ -4,10 +4,10 @@ import junit.framework.TestCase;
import com.vaadin.data.util.ObjectProperty;
import com.vaadin.data.validator.RangeValidator;
-import com.vaadin.tests.data.converter.ConverterFactory.ConvertTo42;
+import com.vaadin.tests.data.converter.ConverterFactoryTest.ConvertTo42;
import com.vaadin.ui.TextField;
-public class TextFieldWithConverterAndValidator extends TestCase {
+public class TextFieldWithConverterAndValidatorTest extends TestCase {
private TextField field;
private ObjectProperty<Integer> property;
diff --git a/server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldWithPropertyFormatter.java b/server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldWithPropertyFormatterTest.java
index 59922d819f..8f2bec455b 100644
--- a/server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldWithPropertyFormatter.java
+++ b/server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldWithPropertyFormatterTest.java
@@ -11,7 +11,7 @@ import com.vaadin.data.util.ObjectProperty;
import com.vaadin.data.util.PropertyFormatter;
import com.vaadin.ui.TextField;
-public class TextFieldWithPropertyFormatter extends TestCase {
+public class TextFieldWithPropertyFormatterTest extends TestCase {
private static final String INPUT_VALUE = "foo";
private static final String PARSED_VALUE = "BAR";
diff --git a/server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldWithValidator.java b/server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldWithValidatorTest.java
index 2a79d1fe27..b2a51aad8b 100644
--- a/server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldWithValidator.java
+++ b/server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldWithValidatorTest.java
@@ -10,7 +10,7 @@ import com.vaadin.data.validator.RegexpValidator;
import com.vaadin.data.validator.StringLengthValidator;
import com.vaadin.ui.TextField;
-public class TextFieldWithValidator extends TestCase {
+public class TextFieldWithValidatorTest extends TestCase {
private TextField field;
private ObjectProperty<String> property;
diff --git a/server/tests/src/com/vaadin/tests/server/component/textfield/TestWriteDesign.java b/server/tests/src/com/vaadin/tests/server/component/textfield/WriteDesignTest.java
index 479c94f6a8..061b0ff402 100644
--- a/server/tests/src/com/vaadin/tests/server/component/textfield/TestWriteDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/textfield/WriteDesignTest.java
@@ -30,7 +30,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestWriteDesign extends TestCase {
+public class WriteDesignTest extends TestCase {
private DesignContext ctx;
@Override
diff --git a/server/tests/src/com/vaadin/tests/server/component/tree/TestListeners.java b/server/tests/src/com/vaadin/tests/server/component/tree/ListenersTest.java
index 4984cf161b..c327fe8c5f 100644
--- a/server/tests/src/com/vaadin/tests/server/component/tree/TestListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/tree/ListenersTest.java
@@ -11,7 +11,7 @@ import com.vaadin.ui.Tree.CollapseListener;
import com.vaadin.ui.Tree.ExpandEvent;
import com.vaadin.ui.Tree.ExpandListener;
-public class TestListeners extends TestCase implements ExpandListener,
+public class ListenersTest extends TestCase implements ExpandListener,
CollapseListener {
private int expandCalled;
private int collapseCalled;
diff --git a/server/tests/src/com/vaadin/tests/server/component/tree/TreeListeners.java b/server/tests/src/com/vaadin/tests/server/component/tree/TreeListenersTest.java
index 8d5b499264..449f418596 100644
--- a/server/tests/src/com/vaadin/tests/server/component/tree/TreeListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/tree/TreeListenersTest.java
@@ -2,14 +2,14 @@ package com.vaadin.tests.server.component.tree;
import com.vaadin.event.ItemClickEvent;
import com.vaadin.event.ItemClickEvent.ItemClickListener;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.Tree;
import com.vaadin.ui.Tree.CollapseEvent;
import com.vaadin.ui.Tree.CollapseListener;
import com.vaadin.ui.Tree.ExpandEvent;
import com.vaadin.ui.Tree.ExpandListener;
-public class TreeListeners extends AbstractListenerMethodsTest {
+public class TreeListenersTest extends AbstractListenerMethodsTestBase {
public void testExpandListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(Tree.class, ExpandEvent.class,
ExpandListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/treetable/EmptyTreeTable.java b/server/tests/src/com/vaadin/tests/server/component/treetable/EmptyTreeTableTest.java
index 535ed8e860..a886b74f57 100644
--- a/server/tests/src/com/vaadin/tests/server/component/treetable/EmptyTreeTable.java
+++ b/server/tests/src/com/vaadin/tests/server/component/treetable/EmptyTreeTableTest.java
@@ -4,7 +4,7 @@ import junit.framework.TestCase;
import com.vaadin.ui.TreeTable;
-public class EmptyTreeTable extends TestCase {
+public class EmptyTreeTableTest extends TestCase {
public void testLastId() {
TreeTable treeTable = new TreeTable();
diff --git a/server/tests/src/com/vaadin/tests/server/component/treetable/TreeTableSetContainerNull.java b/server/tests/src/com/vaadin/tests/server/component/treetable/TreeTableSetContainerNullTest.java
index a3b79a14f0..4a34094da1 100644
--- a/server/tests/src/com/vaadin/tests/server/component/treetable/TreeTableSetContainerNull.java
+++ b/server/tests/src/com/vaadin/tests/server/component/treetable/TreeTableSetContainerNullTest.java
@@ -4,7 +4,7 @@ import junit.framework.TestCase;
import com.vaadin.ui.TreeTable;
-public class TreeTableSetContainerNull extends TestCase {
+public class TreeTableSetContainerNullTest extends TestCase {
public void testNullContainer() {
TreeTable treeTable = new TreeTable();
diff --git a/server/tests/src/com/vaadin/tests/server/component/ui/CustomUIClassLoader.java b/server/tests/src/com/vaadin/tests/server/component/ui/CustomUIClassLoaderTest.java
index 1df1d36cab..be23a998a3 100644
--- a/server/tests/src/com/vaadin/tests/server/component/ui/CustomUIClassLoader.java
+++ b/server/tests/src/com/vaadin/tests/server/component/ui/CustomUIClassLoaderTest.java
@@ -18,7 +18,7 @@ import com.vaadin.server.VaadinSession;
import com.vaadin.tests.util.AlwaysLockedVaadinSession;
import com.vaadin.ui.UI;
-public class CustomUIClassLoader extends TestCase {
+public class CustomUIClassLoaderTest extends TestCase {
/**
* Stub root
@@ -68,7 +68,7 @@ public class CustomUIClassLoader extends TestCase {
private static DeploymentConfiguration createConfigurationMock() {
Properties properties = new Properties();
properties.put(VaadinSession.UI_PARAMETER, MyUI.class.getName());
- return new DefaultDeploymentConfiguration(CustomUIClassLoader.class,
+ return new DefaultDeploymentConfiguration(CustomUIClassLoaderTest.class,
properties);
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/ui/LegacyUIAddRemoveComponents.java b/server/tests/src/com/vaadin/tests/server/component/ui/LegacyUIAddRemoveComponentsTest.java
index 24fd3d85a8..2a88bb3208 100644
--- a/server/tests/src/com/vaadin/tests/server/component/ui/LegacyUIAddRemoveComponents.java
+++ b/server/tests/src/com/vaadin/tests/server/component/ui/LegacyUIAddRemoveComponentsTest.java
@@ -11,7 +11,7 @@ import com.vaadin.ui.Component;
import com.vaadin.ui.Label;
import com.vaadin.ui.LegacyWindow;
-public class LegacyUIAddRemoveComponents {
+public class LegacyUIAddRemoveComponentsTest {
private static class TestUI extends LegacyWindow {
@Override
diff --git a/server/tests/src/com/vaadin/tests/server/component/upload/UploadListeners.java b/server/tests/src/com/vaadin/tests/server/component/upload/UploadListenersTest.java
index 265e5382d4..13d4c6bfe6 100644
--- a/server/tests/src/com/vaadin/tests/server/component/upload/UploadListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/upload/UploadListenersTest.java
@@ -1,7 +1,7 @@
package com.vaadin.tests.server.component.upload;
import com.vaadin.server.StreamVariable.StreamingProgressEvent;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.Upload;
import com.vaadin.ui.Upload.FailedEvent;
import com.vaadin.ui.Upload.FailedListener;
@@ -13,7 +13,7 @@ import com.vaadin.ui.Upload.StartedListener;
import com.vaadin.ui.Upload.SucceededEvent;
import com.vaadin.ui.Upload.SucceededListener;
-public class UploadListeners extends AbstractListenerMethodsTest {
+public class UploadListenersTest extends AbstractListenerMethodsTestBase {
public void testProgressListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(Upload.class, StreamingProgressEvent.class,
ProgressListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/window/AddRemoveSubWindow.java b/server/tests/src/com/vaadin/tests/server/component/window/AddRemoveSubWindowTest.java
index 774eafceaf..7fa8665c01 100644
--- a/server/tests/src/com/vaadin/tests/server/component/window/AddRemoveSubWindow.java
+++ b/server/tests/src/com/vaadin/tests/server/component/window/AddRemoveSubWindowTest.java
@@ -13,7 +13,7 @@ import com.vaadin.ui.LegacyWindow;
import com.vaadin.ui.UI;
import com.vaadin.ui.Window;
-public class AddRemoveSubWindow {
+public class AddRemoveSubWindowTest {
public class TestApp extends LegacyApplication {
diff --git a/server/tests/src/com/vaadin/tests/server/component/window/AttachDetachWindow.java b/server/tests/src/com/vaadin/tests/server/component/window/AttachDetachWindowTest.java
index 5720744e2f..9f7a54df9c 100644
--- a/server/tests/src/com/vaadin/tests/server/component/window/AttachDetachWindow.java
+++ b/server/tests/src/com/vaadin/tests/server/component/window/AttachDetachWindowTest.java
@@ -19,7 +19,7 @@ import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
-public class AttachDetachWindow {
+public class AttachDetachWindowTest {
private VaadinSession testApp = new AlwaysLockedVaadinSession(null);
diff --git a/server/tests/src/com/vaadin/tests/server/component/window/WindowAttach.java b/server/tests/src/com/vaadin/tests/server/component/window/WindowAttachTest.java
index 586300f650..867342ab03 100644
--- a/server/tests/src/com/vaadin/tests/server/component/window/WindowAttach.java
+++ b/server/tests/src/com/vaadin/tests/server/component/window/WindowAttachTest.java
@@ -22,7 +22,7 @@ import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
-public class WindowAttach {
+public class WindowAttachTest {
private static class MyUI extends UI {
@Override
diff --git a/server/tests/src/com/vaadin/tests/server/component/window/WindowListeners.java b/server/tests/src/com/vaadin/tests/server/component/window/WindowListenersTest.java
index c33871cbd8..87a1af301c 100644
--- a/server/tests/src/com/vaadin/tests/server/component/window/WindowListeners.java
+++ b/server/tests/src/com/vaadin/tests/server/component/window/WindowListenersTest.java
@@ -4,14 +4,14 @@ import com.vaadin.event.FieldEvents.BlurEvent;
import com.vaadin.event.FieldEvents.BlurListener;
import com.vaadin.event.FieldEvents.FocusEvent;
import com.vaadin.event.FieldEvents.FocusListener;
-import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.Window;
import com.vaadin.ui.Window.CloseEvent;
import com.vaadin.ui.Window.CloseListener;
import com.vaadin.ui.Window.ResizeEvent;
import com.vaadin.ui.Window.ResizeListener;
-public class WindowListeners extends AbstractListenerMethodsTest {
+public class WindowListenersTest extends AbstractListenerMethodsTestBase {
public void testFocusListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(Window.class, FocusEvent.class,
FocusListener.class);
diff --git a/server/tests/src/com/vaadin/tests/server/componentcontainer/AbstractIndexedLayoutTest.java b/server/tests/src/com/vaadin/tests/server/componentcontainer/AbstractIndexedLayoutTestBase.java
index e3e743d02a..f19821f92e 100644
--- a/server/tests/src/com/vaadin/tests/server/componentcontainer/AbstractIndexedLayoutTest.java
+++ b/server/tests/src/com/vaadin/tests/server/componentcontainer/AbstractIndexedLayoutTestBase.java
@@ -6,7 +6,7 @@ import com.vaadin.ui.Component;
import com.vaadin.ui.Label;
import com.vaadin.ui.Layout;
-public abstract class AbstractIndexedLayoutTest extends TestCase {
+public abstract class AbstractIndexedLayoutTestBase extends TestCase {
private Layout layout;
diff --git a/server/tests/src/com/vaadin/tests/server/componentcontainer/CssLayoutTest.java b/server/tests/src/com/vaadin/tests/server/componentcontainer/CssLayoutTest.java
index dc9667c38e..8dd36beda3 100644
--- a/server/tests/src/com/vaadin/tests/server/componentcontainer/CssLayoutTest.java
+++ b/server/tests/src/com/vaadin/tests/server/componentcontainer/CssLayoutTest.java
@@ -4,7 +4,7 @@ import com.vaadin.ui.Component;
import com.vaadin.ui.CssLayout;
import com.vaadin.ui.Layout;
-public class CssLayoutTest extends AbstractIndexedLayoutTest {
+public class CssLayoutTest extends AbstractIndexedLayoutTestBase {
@Override
protected Layout createLayout() {
diff --git a/server/tests/src/com/vaadin/tests/server/componentcontainer/FormLayoutTest.java b/server/tests/src/com/vaadin/tests/server/componentcontainer/FormLayoutTest.java
index 50de871106..c689e7fe06 100644
--- a/server/tests/src/com/vaadin/tests/server/componentcontainer/FormLayoutTest.java
+++ b/server/tests/src/com/vaadin/tests/server/componentcontainer/FormLayoutTest.java
@@ -10,7 +10,7 @@ import com.vaadin.ui.FormLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Layout;
-public class FormLayoutTest extends AbstractIndexedLayoutTest {
+public class FormLayoutTest extends AbstractIndexedLayoutTestBase {
@Override
protected Layout createLayout() {
diff --git a/server/tests/src/com/vaadin/tests/server/componentcontainer/VerticalLayoutTest.java b/server/tests/src/com/vaadin/tests/server/componentcontainer/VerticalLayoutTest.java
index 0e3a1d5734..565cc8e8ab 100644
--- a/server/tests/src/com/vaadin/tests/server/componentcontainer/VerticalLayoutTest.java
+++ b/server/tests/src/com/vaadin/tests/server/componentcontainer/VerticalLayoutTest.java
@@ -4,7 +4,7 @@ import com.vaadin.ui.Component;
import com.vaadin.ui.Layout;
import com.vaadin.ui.VerticalLayout;
-public class VerticalLayoutTest extends AbstractIndexedLayoutTest {
+public class VerticalLayoutTest extends AbstractIndexedLayoutTestBase {
@Override
protected Layout createLayout() {
diff --git a/server/tests/src/com/vaadin/tests/server/components/AbstractTestFieldValueChange.java b/server/tests/src/com/vaadin/tests/server/components/AbstractFieldValueChangeTestBase.java
index c8d6ecce9c..637947fc9b 100644
--- a/server/tests/src/com/vaadin/tests/server/components/AbstractTestFieldValueChange.java
+++ b/server/tests/src/com/vaadin/tests/server/components/AbstractFieldValueChangeTestBase.java
@@ -22,7 +22,7 @@ import com.vaadin.ui.AbstractField;
* override {@link #setValue(AbstractField)} to set the field value via
* <code>changeVariables()</code>.
*/
-public abstract class AbstractTestFieldValueChange<T> extends TestCase {
+public abstract class AbstractFieldValueChangeTestBase<T> extends TestCase {
private AbstractField<T> field;
private ValueChangeListener listener;
diff --git a/server/tests/src/com/vaadin/tests/server/components/TestComboBoxValueChange.java b/server/tests/src/com/vaadin/tests/server/components/ComboBoxValueChangeTest.java
index 308889fa33..f3cc337657 100644
--- a/server/tests/src/com/vaadin/tests/server/components/TestComboBoxValueChange.java
+++ b/server/tests/src/com/vaadin/tests/server/components/ComboBoxValueChangeTest.java
@@ -12,8 +12,8 @@ import com.vaadin.ui.ComboBox;
*
* See <a href="http://dev.vaadin.com/ticket/4394">Ticket 4394</a>.
*/
-public class TestComboBoxValueChange extends
- AbstractTestFieldValueChange<Object> {
+public class ComboBoxValueChangeTest extends
+ AbstractFieldValueChangeTestBase<Object> {
@Override
protected void setUp() throws Exception {
ComboBox combo = new ComboBox();
diff --git a/server/tests/src/com/vaadin/tests/server/components/TestGridLayoutLastRowRemoval.java b/server/tests/src/com/vaadin/tests/server/components/GridLayoutLastRowRemovalTest.java
index 92664917fd..3467d1d80c 100644
--- a/server/tests/src/com/vaadin/tests/server/components/TestGridLayoutLastRowRemoval.java
+++ b/server/tests/src/com/vaadin/tests/server/components/GridLayoutLastRowRemovalTest.java
@@ -5,7 +5,7 @@ import junit.framework.TestCase;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
-public class TestGridLayoutLastRowRemoval extends TestCase {
+public class GridLayoutLastRowRemovalTest extends TestCase {
public void testRemovingLastRow() {
GridLayout grid = new GridLayout(2, 1);
diff --git a/server/tests/src/com/vaadin/tests/server/components/TestTextFieldValueChange.java b/server/tests/src/com/vaadin/tests/server/components/TextFieldValueChangeTest.java
index 7c47b94df4..cfceb6f7d7 100644
--- a/server/tests/src/com/vaadin/tests/server/components/TestTextFieldValueChange.java
+++ b/server/tests/src/com/vaadin/tests/server/components/TextFieldValueChangeTest.java
@@ -17,8 +17,8 @@ import com.vaadin.ui.TextField;
*
* See <a href="http://dev.vaadin.com/ticket/4394">Ticket 4394</a>.
*/
-public class TestTextFieldValueChange extends
- AbstractTestFieldValueChange<String> {
+public class TextFieldValueChangeTest extends
+ AbstractFieldValueChangeTestBase<String> {
@Override
protected void setUp() throws Exception {
diff --git a/server/tests/src/com/vaadin/tests/server/components/TestWindow.java b/server/tests/src/com/vaadin/tests/server/components/WindowTest.java
index 6707965be6..26fe238342 100644
--- a/server/tests/src/com/vaadin/tests/server/components/TestWindow.java
+++ b/server/tests/src/com/vaadin/tests/server/components/WindowTest.java
@@ -14,7 +14,7 @@ import com.vaadin.ui.Window.CloseListener;
import com.vaadin.ui.Window.ResizeEvent;
import com.vaadin.ui.Window.ResizeListener;
-public class TestWindow extends TestCase {
+public class WindowTest extends TestCase {
private Window window;
diff --git a/server/tests/src/com/vaadin/tests/server/validation/TestBeanValidation.java b/server/tests/src/com/vaadin/tests/server/validation/BeanValidationTest.java
index 832ae14950..6b7582525e 100644
--- a/server/tests/src/com/vaadin/tests/server/validation/TestBeanValidation.java
+++ b/server/tests/src/com/vaadin/tests/server/validation/BeanValidationTest.java
@@ -9,7 +9,7 @@ import com.vaadin.data.validator.BeanValidator;
import com.vaadin.tests.data.bean.BeanToValidate;
import com.vaadin.ui.Field;
-public class TestBeanValidation {
+public class BeanValidationTest {
@Test(expected = InvalidValueException.class)
public void testBeanValidationNull() {
BeanValidator validator = new BeanValidator(BeanToValidate.class,
diff --git a/server/tests/src/com/vaadin/tests/server/validation/TestReadOnlyValidation.java b/server/tests/src/com/vaadin/tests/server/validation/ReadOnlyValidationTest.java
index e37b97e02c..661236e597 100644
--- a/server/tests/src/com/vaadin/tests/server/validation/TestReadOnlyValidation.java
+++ b/server/tests/src/com/vaadin/tests/server/validation/ReadOnlyValidationTest.java
@@ -5,7 +5,7 @@ import org.junit.Test;
import com.vaadin.data.validator.IntegerValidator;
import com.vaadin.ui.TextField;
-public class TestReadOnlyValidation {
+public class ReadOnlyValidationTest {
@Test
public void testIntegerValidation() {
diff --git a/server/tests/src/com/vaadin/ui/AbsFieldDataSourceLocaleChange.java b/server/tests/src/com/vaadin/ui/AbsFieldDataSourceLocaleChangeTest.java
index fa69fc46da..bb5babf360 100644
--- a/server/tests/src/com/vaadin/ui/AbsFieldDataSourceLocaleChange.java
+++ b/server/tests/src/com/vaadin/ui/AbsFieldDataSourceLocaleChangeTest.java
@@ -12,7 +12,7 @@ import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinSession;
import com.vaadin.tests.util.AlwaysLockedVaadinSession;
-public class AbsFieldDataSourceLocaleChange {
+public class AbsFieldDataSourceLocaleChangeTest {
private VaadinSession vaadinSession;
private UI ui;
diff --git a/server/tests/src/com/vaadin/ui/AbstractSelectTest.java b/server/tests/src/com/vaadin/ui/AbsSelectTest.java
index bd399f088c..0b807c5f21 100644
--- a/server/tests/src/com/vaadin/ui/AbstractSelectTest.java
+++ b/server/tests/src/com/vaadin/ui/AbsSelectTest.java
@@ -23,7 +23,7 @@ import org.junit.Test;
import com.vaadin.data.util.ObjectProperty;
-public class AbstractSelectTest {
+public class AbsSelectTest {
@Test
public void addItemsStrings() {
diff --git a/server/tests/src/com/vaadin/ui/LabelDataSource.java b/server/tests/src/com/vaadin/ui/LabelDataSourceTest.java
index b57e83df8e..8ec3ca1245 100644
--- a/server/tests/src/com/vaadin/ui/LabelDataSource.java
+++ b/server/tests/src/com/vaadin/ui/LabelDataSourceTest.java
@@ -26,7 +26,7 @@ import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinSession;
import com.vaadin.tests.util.AlwaysLockedVaadinSession;
-public class LabelDataSource {
+public class LabelDataSourceTest {
Label label;
private static final String STRING_DS_VALUE = "String DatA source";
diff --git a/server/tests/src/com/vaadin/ui/UIThemeEscaping.java b/server/tests/src/com/vaadin/ui/UIThemeEscapingTest.java
index 236f283823..7a0a5551e3 100644
--- a/server/tests/src/com/vaadin/ui/UIThemeEscaping.java
+++ b/server/tests/src/com/vaadin/ui/UIThemeEscapingTest.java
@@ -25,7 +25,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-public class UIThemeEscaping {
+public class UIThemeEscapingTest {
private UI ui;
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 {
diff --git a/shared/src/com/vaadin/shared/ui/calendar/CalendarState.java b/shared/src/com/vaadin/shared/ui/calendar/CalendarState.java
index 93bd05bc1e..c26c4ead16 100644
--- a/shared/src/com/vaadin/shared/ui/calendar/CalendarState.java
+++ b/shared/src/com/vaadin/shared/ui/calendar/CalendarState.java
@@ -38,6 +38,7 @@ public class CalendarState extends AbstractComponentState {
public List<CalendarState.Day> days;
public List<CalendarState.Event> events;
public List<CalendarState.Action> actions;
+ public boolean eventCaptionAsHtml;
public static class Day implements java.io.Serializable {
public String date;
diff --git a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java
index 1f72495596..e2b93ab7d2 100644
--- a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java
+++ b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java
@@ -17,6 +17,7 @@ package com.vaadin.launcher;
import java.io.File;
import java.io.IOException;
+import java.io.Serializable;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
@@ -45,10 +46,16 @@ import com.vaadin.server.LegacyVaadinServlet;
import com.vaadin.server.ServiceException;
import com.vaadin.server.SessionInitEvent;
import com.vaadin.server.SessionInitListener;
+import com.vaadin.server.SystemMessages;
+import com.vaadin.server.SystemMessagesInfo;
+import com.vaadin.server.SystemMessagesProvider;
import com.vaadin.server.UIClassSelectionEvent;
import com.vaadin.server.UIProvider;
import com.vaadin.server.VaadinRequest;
+import com.vaadin.server.VaadinService;
+import com.vaadin.server.VaadinServlet;
import com.vaadin.server.VaadinServletRequest;
+import com.vaadin.server.VaadinServletService;
import com.vaadin.server.VaadinSession;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.UI;
@@ -57,6 +64,9 @@ import com.vaadin.util.CurrentInstance;
@SuppressWarnings("serial")
public class ApplicationRunnerServlet extends LegacyVaadinServlet {
+ public static String CUSTOM_SYSTEM_MESSAGES_PROPERTY = "custom-"
+ + SystemMessages.class.getName();
+
/**
* The name of the application class currently used. Only valid within one
* request.
@@ -184,6 +194,29 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
return getApplicationRunnerURIs(request).applicationClassname;
}
+ private final static class ProxyDeploymentConfiguration implements
+ InvocationHandler, Serializable {
+ private final DeploymentConfiguration originalConfiguration;
+
+ private ProxyDeploymentConfiguration(
+ DeploymentConfiguration originalConfiguration) {
+ this.originalConfiguration = originalConfiguration;
+ }
+
+ @Override
+ public Object invoke(Object proxy, Method method, Object[] args)
+ throws Throwable {
+ if (method.getDeclaringClass() == DeploymentConfiguration.class) {
+ // Find the configuration instance to delegate to
+ DeploymentConfiguration configuration = findDeploymentConfiguration(originalConfiguration);
+
+ return method.invoke(configuration, args);
+ } else {
+ return method.invoke(proxy, args);
+ }
+ }
+ }
+
private static final class ApplicationRunnerUIProvider extends UIProvider {
private final Class<?> classToRun;
@@ -309,23 +342,38 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
return (DeploymentConfiguration) Proxy.newProxyInstance(
DeploymentConfiguration.class.getClassLoader(),
new Class[] { DeploymentConfiguration.class },
- new InvocationHandler() {
- @Override
- public Object invoke(Object proxy, Method method,
- Object[] args) throws Throwable {
- if (method.getDeclaringClass() == DeploymentConfiguration.class) {
- // Find the configuration instance to delegate to
- DeploymentConfiguration configuration = findDeploymentConfiguration(originalConfiguration);
-
- return method.invoke(configuration, args);
- } else {
- return method.invoke(proxy, args);
- }
- }
- });
+ new ProxyDeploymentConfiguration(originalConfiguration));
+ }
+
+ @Override
+ protected VaadinServletService createServletService(
+ DeploymentConfiguration deploymentConfiguration)
+ throws ServiceException {
+ VaadinServletService service = super
+ .createServletService(deploymentConfiguration);
+ final SystemMessagesProvider provider = service
+ .getSystemMessagesProvider();
+ service.setSystemMessagesProvider(new SystemMessagesProvider() {
+
+ @Override
+ public SystemMessages getSystemMessages(
+ SystemMessagesInfo systemMessagesInfo) {
+ if (systemMessagesInfo.getRequest() == null) {
+ return provider.getSystemMessages(systemMessagesInfo);
+ }
+ Object messages = systemMessagesInfo.getRequest().getAttribute(
+ CUSTOM_SYSTEM_MESSAGES_PROPERTY);
+ if (messages instanceof SystemMessages) {
+ return (SystemMessages) messages;
+ }
+ return provider.getSystemMessages(systemMessagesInfo);
+ }
+
+ });
+ return service;
}
- private DeploymentConfiguration findDeploymentConfiguration(
+ private static DeploymentConfiguration findDeploymentConfiguration(
DeploymentConfiguration originalConfiguration) throws Exception {
// First level of cache
DeploymentConfiguration configuration = CurrentInstance
@@ -344,16 +392,19 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
* request.
*/
- HttpServletRequest currentRequest = request.get();
+ HttpServletRequest currentRequest = VaadinServletService
+ .getCurrentServletRequest();
if (currentRequest != null) {
HttpSession httpSession = currentRequest.getSession(false);
if (httpSession != null) {
Map<Class<?>, CurrentInstance> oldCurrent = CurrentInstance
.setCurrent((VaadinSession) null);
try {
- session = getService().findVaadinSession(
- new VaadinServletRequest(currentRequest,
- getService()));
+ VaadinServletService service = (VaadinServletService) VaadinService
+ .getCurrent();
+ session = service
+ .findVaadinSession(new VaadinServletRequest(
+ currentRequest, service));
} finally {
/*
* Clear some state set by findVaadinSession to
@@ -377,9 +428,11 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
.getAttribute(name);
if (configuration == null) {
+ ApplicationRunnerServlet servlet = (ApplicationRunnerServlet) VaadinServlet
+ .getCurrent();
Class<?> classToRun;
try {
- classToRun = getClassToRun();
+ classToRun = servlet.getClassToRun();
} catch (ClassNotFoundException e) {
/*
* This happens e.g. if the UI class defined in the
@@ -402,7 +455,7 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
}
configuration = new DefaultDeploymentConfiguration(
- getClass(), initParameters);
+ servlet.getClass(), initParameters);
} else {
configuration = originalConfiguration;
}
diff --git a/uitest/src/com/vaadin/tests/accessibility/WindowWaiAriaRoles.java b/uitest/src/com/vaadin/tests/accessibility/WindowWaiAriaRoles.java
index 2ab6be25ac..c015b65e1f 100644
--- a/uitest/src/com/vaadin/tests/accessibility/WindowWaiAriaRoles.java
+++ b/uitest/src/com/vaadin/tests/accessibility/WindowWaiAriaRoles.java
@@ -35,7 +35,7 @@ public class WindowWaiAriaRoles extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -86,7 +86,7 @@ public class WindowWaiAriaRoles extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -96,7 +96,7 @@ public class WindowWaiAriaRoles extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/com/vaadin/tests/components/button/ButtonToggleIcons.java b/uitest/src/com/vaadin/tests/components/button/ButtonToggleIcons.java
index cee71fdf4e..9e37fef7d9 100644
--- a/uitest/src/com/vaadin/tests/components/button/ButtonToggleIcons.java
+++ b/uitest/src/com/vaadin/tests/components/button/ButtonToggleIcons.java
@@ -1,38 +1,38 @@
-package com.vaadin.tests.components.button;
-
-import com.vaadin.server.ThemeResource;
-import com.vaadin.server.VaadinRequest;
-import com.vaadin.ui.Button;
-import com.vaadin.ui.Button.ClickEvent;
-import com.vaadin.ui.Button.ClickListener;
-import com.vaadin.ui.NativeButton;
-import com.vaadin.ui.UI;
-import com.vaadin.ui.VerticalLayout;
-
-@SuppressWarnings("serial")
-public class ButtonToggleIcons extends UI {
-
- @Override
- protected void init(final VaadinRequest request) {
- final VerticalLayout layout = new VerticalLayout();
- setContent(layout);
-
- final ThemeResource iconResource = new ThemeResource(
- "../runo/icons/16/arrow-left.png");
-
- final ClickListener iconToggleListener = new ClickListener() {
- @Override
- public void buttonClick(final ClickEvent event) {
- final Button btn = event.getButton();
- if (btn.getIcon() == null) {
- btn.setIcon(iconResource);
- } else {
- btn.setIcon(null);
- }
- }
- };
-
- layout.addComponent(new Button("Toggle icon", iconToggleListener));
- layout.addComponent(new NativeButton("Toggle icon", iconToggleListener));
- }
-}
+package com.vaadin.tests.components.button;
+
+import com.vaadin.server.ThemeResource;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.Button.ClickListener;
+import com.vaadin.ui.NativeButton;
+import com.vaadin.ui.UI;
+import com.vaadin.ui.VerticalLayout;
+
+@SuppressWarnings("serial")
+public class ButtonToggleIcons extends UI {
+
+ @Override
+ protected void init(final VaadinRequest request) {
+ final VerticalLayout layout = new VerticalLayout();
+ setContent(layout);
+
+ final ThemeResource iconResource = new ThemeResource(
+ "../runo/icons/16/arrow-left.png");
+
+ final ClickListener iconToggleListener = new ClickListener() {
+ @Override
+ public void buttonClick(final ClickEvent event) {
+ final Button btn = event.getButton();
+ if (btn.getIcon() == null) {
+ btn.setIcon(iconResource);
+ } else {
+ btn.setIcon(null);
+ }
+ }
+ };
+
+ layout.addComponent(new Button("Toggle icon", iconToggleListener));
+ layout.addComponent(new NativeButton("Toggle icon", iconToggleListener));
+ }
+}
diff --git a/uitest/src/com/vaadin/tests/components/calendar/CalendarHtmlInEvents.java b/uitest/src/com/vaadin/tests/components/calendar/CalendarHtmlInEvents.java
new file mode 100644
index 0000000000..15cde71838
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/calendar/CalendarHtmlInEvents.java
@@ -0,0 +1,101 @@
+/*
+ * 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.components.calendar;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import com.vaadin.data.Property.ValueChangeEvent;
+import com.vaadin.data.Property.ValueChangeListener;
+import com.vaadin.data.util.MethodProperty;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUIWithLog;
+import com.vaadin.ui.Alignment;
+import com.vaadin.ui.Calendar;
+import com.vaadin.ui.CheckBox;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.NativeSelect;
+import com.vaadin.ui.components.calendar.event.BasicEvent;
+import com.vaadin.ui.components.calendar.event.CalendarEvent;
+import com.vaadin.ui.components.calendar.event.CalendarEventProvider;
+
+public class CalendarHtmlInEvents extends AbstractTestUIWithLog {
+
+ private Calendar calendar = new Calendar();
+
+ @Override
+ protected void setup(VaadinRequest request) {
+ final NativeSelect ns = new NativeSelect("Period");
+ ns.addItems("Day", "Week", "Month");
+ ns.addValueChangeListener(new ValueChangeListener() {
+ @Override
+ public void valueChange(ValueChangeEvent event) {
+ if ("Day".equals(ns.getValue())) {
+ calendar.setStartDate(new Date(2014 - 1900, 1 - 1, 1));
+ calendar.setEndDate(new Date(2014 - 1900, 1 - 1, 1));
+ } else if ("Week".equals(ns.getValue())) {
+ calendar.setStartDate(new Date(2014 - 1900, 1 - 1, 1));
+ calendar.setEndDate(new Date(2014 - 1900, 1 - 1, 7));
+ } else if ("Month".equals(ns.getValue())) {
+ calendar.setStartDate(new Date(2014 - 1900, 1 - 1, 1));
+ calendar.setEndDate(new Date(2014 - 1900, 2 - 1, 1));
+ }
+ }
+ });
+ ns.setValue("Month");
+ final CheckBox allowHtml = new CheckBox("Allow HTML in event caption",
+ new MethodProperty<Boolean>(calendar, "eventCaptionAsHtml"));
+ allowHtml.addValueChangeListener(new ValueChangeListener() {
+ @Override
+ public void valueChange(ValueChangeEvent event) {
+ log("HTML in event caption: " + allowHtml.getValue());
+ }
+ });
+ HorizontalLayout hl = new HorizontalLayout();
+ hl.setDefaultComponentAlignment(Alignment.BOTTOM_LEFT);
+ hl.addComponents(ns, allowHtml);
+ hl.setSpacing(true);
+ hl.setMargin(true);
+ calendar.setEventProvider(new CalendarEventProvider() {
+
+ @Override
+ public List<CalendarEvent> getEvents(Date startDate, Date endDate) {
+ Date d = startDate;
+ ArrayList<CalendarEvent> events = new ArrayList<CalendarEvent>();
+ while (d.before(endDate)) {
+ BasicEvent ce = new BasicEvent();
+ ce.setAllDay(false);
+ ce.setCaption("<b>Hello</b> <u>world</u>!");
+ ce.setDescription("Nothing really important");
+ Date start = new Date(d.getTime());
+ start.setHours(d.getDay());
+ Date end = new Date(d.getTime());
+ end.setHours(d.getDay() + 3);
+ ce.setStart(start);
+ ce.setEnd(end);
+ events.add(ce);
+ d.setTime(d.getTime() + 1000 * 60 * 60 * 24);
+ }
+
+ return events;
+ }
+
+ });
+ addComponent(hl);
+ addComponent(calendar);
+ }
+}
diff --git a/uitest/src/com/vaadin/tests/components/calendar/CalendarHtmlInEventsTest.java b/uitest/src/com/vaadin/tests/components/calendar/CalendarHtmlInEventsTest.java
new file mode 100644
index 0000000000..31e3f754e3
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/calendar/CalendarHtmlInEventsTest.java
@@ -0,0 +1,103 @@
+/*
+ * 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.components.calendar;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebElement;
+
+import com.vaadin.testbench.elements.CalendarElement;
+import com.vaadin.testbench.elements.CheckBoxElement;
+import com.vaadin.testbench.elements.NativeSelectElement;
+import com.vaadin.tests.tb3.SingleBrowserTest;
+
+public class CalendarHtmlInEventsTest extends SingleBrowserTest {
+
+ private NativeSelectElement periodSelect;
+ private CheckBoxElement htmlAllowed;
+ private CalendarElement calendar;
+
+ @Override
+ public void setup() throws Exception {
+ super.setup();
+ openTestURL();
+ periodSelect = $(NativeSelectElement.class).first();
+ htmlAllowed = $(CheckBoxElement.class).first();
+ calendar = $(CalendarElement.class).first();
+ }
+
+ @Test
+ public void monthViewEventCaptions() {
+ Assert.assertEquals(getMonthEvent(0).getText(),
+ "12:00 AM <b>Hello</b> <u>world</u>!");
+
+ // Switch to HTML mode
+ click(htmlAllowed);
+ Assert.assertEquals("1. HTML in event caption: true", getLogRow(0));
+
+ Assert.assertEquals(getMonthEvent(0).getText(), "12:00 AM Hello world!");
+ }
+
+ @Test
+ public void weekViewEventCaptions() {
+ periodSelect.selectByText("Week");
+ Assert.assertEquals("4:00 AM\n<b>Hello</b> <u>world</u>!",
+ getWeekEvent(1).getText());
+
+ // Switch to HTML mode
+ click(htmlAllowed);
+ Assert.assertEquals("1. HTML in event caption: true", getLogRow(0));
+
+ Assert.assertEquals("4:00 AM\nHello world!", getWeekEvent(1).getText());
+ }
+
+ @Test
+ public void dayViewEventCaptions() {
+ periodSelect.selectByText("Day");
+ Assert.assertEquals("3:00 AM\n<b>Hello</b> <u>world</u>!",
+ getWeekEvent(0).getText());
+
+ // Switch to HTML mode
+ click(htmlAllowed);
+ Assert.assertEquals("1. HTML in event caption: true", getLogRow(0));
+ Assert.assertEquals("3:00 AM\nHello world!", getWeekEvent(0).getText());
+ }
+
+ private WebElement getMonthEvent(int dayInCalendar) {
+ return getMonthDay(dayInCalendar).findElement(
+ By.className("v-calendar-event"));
+ }
+
+ private WebElement getWeekEvent(int dayInCalendar) {
+ return getWeekDay(dayInCalendar).findElement(
+ By.className("v-calendar-event"));
+ }
+
+ private void click(CheckBoxElement htmlAllowed2) {
+ htmlAllowed2.findElement(By.xpath("input")).click();
+ }
+
+ private WebElement getMonthDay(int i) {
+ return calendar.findElements(By.className("v-calendar-month-day")).get(
+ i);
+ }
+
+ private WebElement getWeekDay(int i) {
+ return calendar.findElements(By.className("v-calendar-day-times")).get(
+ i);
+ }
+}
diff --git a/uitest/src/com/vaadin/tests/components/calendar/CalendarNotificationsTestIE.java b/uitest/src/com/vaadin/tests/components/calendar/CalendarNotificationsTestIE.java
index 933bca8c7d..62223ccc25 100644
--- a/uitest/src/com/vaadin/tests/components/calendar/CalendarNotificationsTestIE.java
+++ b/uitest/src/com/vaadin/tests/components/calendar/CalendarNotificationsTestIE.java
@@ -62,7 +62,9 @@ public class CalendarNotificationsTestIE extends MultiBrowserTest {
WebElement day = findElements(By.className("v-calendar-day-number"))
.get(2);
// IE8 requires you to click on the text part to fire the event
- new Actions(getDriver()).moveToElement(day, day.getSize().getWidth() - 3, day.getSize().getHeight() / 2).click().perform();
+ new Actions(getDriver())
+ .moveToElement(day, day.getSize().getWidth() - 3,
+ day.getSize().getHeight() / 2).click().perform();
// check that a notification was opened, this is done with a log instead
// of a screenshot or element presence check due to problems with IE
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxValueInput.java b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxValueInput.java
index 1d2c85c974..a35bc46390 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxValueInput.java
+++ b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxValueInput.java
@@ -14,18 +14,21 @@ public class ComboBoxValueInput extends AbstractTestUI {
ComboBox cb = getComboBox("A combobox", false, "default");
addComponent(cb);
- cb = getComboBox("A combobox with input prompt", false, "default-prompt");
+ cb = getComboBox("A combobox with input prompt", false,
+ "default-prompt");
cb.setInputPrompt("Please select");
addComponent(cb);
cb = getComboBox("A combobox with null item", true, "null");
addComponent(cb);
- cb = getComboBox("A combobox with null item and input prompt", true, "null-prompt");
+ cb = getComboBox("A combobox with null item and input prompt", true,
+ "null-prompt");
cb.setInputPrompt("Please select");
addComponent(cb);
- cb = getComboBox("A combobox with filteringMode off", false, "filtering-off");
+ cb = getComboBox("A combobox with filteringMode off", false,
+ "filtering-off");
cb.setFilteringMode(FilteringMode.OFF);
addComponent(cb);
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxValueInputTest.java b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxValueInputTest.java
index b2b3c29098..318ffbe549 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxValueInputTest.java
+++ b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxValueInputTest.java
@@ -131,9 +131,10 @@ public class ComboBoxValueInputTest extends MultiBrowserTest {
assertThat(getComboBoxValue(comboBox), is(""));
- //selectByText doesn't work when filtering is off.
+ // selectByText doesn't work when filtering is off.
comboBox.openPopup();
- List<WebElement> filteredItems = findElements(By.className("gwt-MenuItem"));
+ List<WebElement> filteredItems = findElements(By
+ .className("gwt-MenuItem"));
filteredItems.get(1).click();
sendKeysToComboBox(comboBox, "mnop");
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboSelectedValueBeyondTheFirstDropdownPage.java b/uitest/src/com/vaadin/tests/components/combobox/ComboSelectedValueBeyondTheFirstDropdownPage.java
index 41b61c9062..acfb7b165f 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboSelectedValueBeyondTheFirstDropdownPage.java
+++ b/uitest/src/com/vaadin/tests/components/combobox/ComboSelectedValueBeyondTheFirstDropdownPage.java
@@ -8,7 +8,8 @@ import com.vaadin.ui.ComboBox;
import com.vaadin.ui.Label;
@SuppressWarnings("serial")
-public class ComboSelectedValueBeyondTheFirstDropdownPage extends AbstractTestUI {
+public class ComboSelectedValueBeyondTheFirstDropdownPage extends
+ AbstractTestUI {
protected static final int ITEM_COUNT = 21;
protected static final String ITEM_NAME_TEMPLATE = "Item %d";
diff --git a/uitest/src/com/vaadin/tests/components/customcomponent/CustomComponentChildVisibilityTest.java b/uitest/src/com/vaadin/tests/components/customcomponent/CustomComponentChildVisibilityTest.java
index 4e0204604b..9f1fc6b03e 100644
--- a/uitest/src/com/vaadin/tests/components/customcomponent/CustomComponentChildVisibilityTest.java
+++ b/uitest/src/com/vaadin/tests/components/customcomponent/CustomComponentChildVisibilityTest.java
@@ -25,5 +25,4 @@ public class CustomComponentChildVisibilityTest extends MultiBrowserTest {
return $(LabelElement.class).all().size() > 1;
}
-
} \ No newline at end of file
diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffset.java b/uitest/src/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffset.java
index 62db60be76..a6fda534b2 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffset.java
+++ b/uitest/src/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffset.java
@@ -29,7 +29,7 @@ public class DateFieldDayResolutionOffset extends AbstractTestUI {
addComponent(dateValue);
addComponent(dateField);
- dateField.addValueChangeListener( new Property.ValueChangeListener(){
+ dateField.addValueChangeListener(new Property.ValueChangeListener() {
@Override
public void valueChange(Property.ValueChangeEvent event) {
dateValue.setValue(dateformat.format(dateField.getValue()));
@@ -37,7 +37,8 @@ public class DateFieldDayResolutionOffset extends AbstractTestUI {
});
}
- private DateField getDateField(TimeZone timezone, SimpleDateFormat dateformat) {
+ private DateField getDateField(TimeZone timezone,
+ SimpleDateFormat dateformat) {
final DateField dateField = new DateField();
try {
Date initialDate = dateformat.parse(initialDateString);
@@ -51,7 +52,8 @@ public class DateFieldDayResolutionOffset extends AbstractTestUI {
}
private SimpleDateFormat getDateFormat(TimeZone timezone) {
- final SimpleDateFormat dateformat = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
+ final SimpleDateFormat dateformat = new SimpleDateFormat(
+ "MM/dd/yyyy HH:mm:ss");
dateformat.setTimeZone(timezone);
return dateformat;
}
diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffsetTest.java b/uitest/src/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffsetTest.java
index c3b3af9aa4..4ee9597f68 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffsetTest.java
+++ b/uitest/src/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffsetTest.java
@@ -25,8 +25,9 @@ public class DateFieldDayResolutionOffsetTest extends MultiBrowserTest {
}
private void select2ndOfSeptember() {
- for(WebElement e : findElements(By.className("v-datefield-calendarpanel-day"))) {
- if(e.getText().equals("2")) {
+ for (WebElement e : findElements(By
+ .className("v-datefield-calendarpanel-day"))) {
+ if (e.getText().equals("2")) {
e.click();
break;
}
@@ -36,8 +37,7 @@ public class DateFieldDayResolutionOffsetTest extends MultiBrowserTest {
private void openDatePicker() {
DateFieldElement dateField = $(DateFieldElement.class).first();
- dateField.findElement(By.tagName("button"))
- .click();
+ dateField.findElement(By.tagName("button")).click();
}
} \ No newline at end of file
diff --git a/uitest/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrollingTest.java b/uitest/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrollingTest.java
index 3a0dcafe1f..29476b9ae6 100644
--- a/uitest/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrollingTest.java
+++ b/uitest/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrollingTest.java
@@ -13,11 +13,10 @@ public class TableInFormLayoutCausesScrollingTest extends MultiBrowserTest {
@Test
@Ignore
- //This test is actually testing that #7309 is NOT fixed.
- //Ignoring the test because it is not stable and it's
- //occasionally failing on browsers even when it shouldn't.
-
- //There's no point fixing this test before #7309 is actually fixed.
+ // This test is actually testing that #7309 is NOT fixed.
+ // Ignoring the test because it is not stable and it's
+ // occasionally failing on browsers even when it shouldn't.
+ // There's no point fixing this test before #7309 is actually fixed.
public void pageIsNotScrolled() throws IOException {
openTestURL();
diff --git a/uitest/src/com/vaadin/tests/components/popupview/PopupViewResizeWhileOpenTest.java b/uitest/src/com/vaadin/tests/components/popupview/PopupViewResizeWhileOpenTest.java
index 6c23e4e4a5..ce528df373 100644
--- a/uitest/src/com/vaadin/tests/components/popupview/PopupViewResizeWhileOpenTest.java
+++ b/uitest/src/com/vaadin/tests/components/popupview/PopupViewResizeWhileOpenTest.java
@@ -69,7 +69,7 @@ public class PopupViewResizeWhileOpenTest extends MultiBrowserTest {
}
private WebElement getPopupShadow() {
- //Shadows with index 0: tooltip, index 1: popup
+ // Shadows with index 0: tooltip, index 1: popup
return findElements(By.className("v-shadow")).get(1);
}
diff --git a/uitest/src/com/vaadin/tests/components/table/LongMultiselectTest.java b/uitest/src/com/vaadin/tests/components/table/LongMultiselectTest.java
index ebf2c1dc47..e9f3bbb355 100644
--- a/uitest/src/com/vaadin/tests/components/table/LongMultiselectTest.java
+++ b/uitest/src/com/vaadin/tests/components/table/LongMultiselectTest.java
@@ -38,7 +38,8 @@ public class LongMultiselectTest extends MultiBrowserTest {
TableElement table = getTable();
assertThat(table.getCell(LASTSELECTEDROW, 1).getText(), is("updated"));
- assertThat(table.getCell(LASTSELECTEDROW-1, 1).getText(), is("updated"));
+ assertThat(table.getCell(LASTSELECTEDROW - 1, 1).getText(),
+ is("updated"));
}
private void selectRows() {
@@ -47,8 +48,9 @@ public class LongMultiselectTest extends MultiBrowserTest {
scrollToBottom();
- new Actions(getDriver()).keyDown(Keys.SHIFT).click(getTable().getCell(LASTSELECTEDROW, 0)).keyUp(Keys.SHIFT)
- .build().perform();
+ new Actions(getDriver()).keyDown(Keys.SHIFT)
+ .click(getTable().getCell(LASTSELECTEDROW, 0))
+ .keyUp(Keys.SHIFT).build().perform();
}
private TableElement getTable() {
diff --git a/uitest/src/com/vaadin/tests/components/table/SelectAllConstantViewportTest.java b/uitest/src/com/vaadin/tests/components/table/SelectAllConstantViewportTest.java
index 0e7a7c08a4..504957e773 100644
--- a/uitest/src/com/vaadin/tests/components/table/SelectAllConstantViewportTest.java
+++ b/uitest/src/com/vaadin/tests/components/table/SelectAllConstantViewportTest.java
@@ -51,7 +51,8 @@ public class SelectAllConstantViewportTest extends MultiBrowserTest {
int rowLocation = row.getLocation().getY();
- // use click x,y with non-zero offset to actually toggle the checkbox. (#13763)
+ // use click x,y with non-zero offset to actually toggle the checkbox.
+ // (#13763)
checkbox.click(5, 5);
int newRowLocation = row.getLocation().getY();
diff --git a/uitest/src/com/vaadin/tests/components/table/TableClickAndDragOnIconAndComponentsTest.java b/uitest/src/com/vaadin/tests/components/table/TableClickAndDragOnIconAndComponentsTest.java
index aee8cc96d9..4a9d17c02d 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableClickAndDragOnIconAndComponentsTest.java
+++ b/uitest/src/com/vaadin/tests/components/table/TableClickAndDragOnIconAndComponentsTest.java
@@ -105,8 +105,8 @@ public class TableClickAndDragOnIconAndComponentsTest extends MultiBrowserTest {
}
private void assertThatFocusTextFieldHasText(String text) {
- List<WebElement> focused = getTable().findElements(By
- .className("v-textfield-focus"));
+ List<WebElement> focused = getTable().findElements(
+ By.className("v-textfield-focus"));
assertThat(focused.get(0).getAttribute("value"), is(text));
}
@@ -114,7 +114,7 @@ public class TableClickAndDragOnIconAndComponentsTest extends MultiBrowserTest {
private int getSelectedRowTextValue() {
WebElement selectedRow = getSelectedRow();
- //i.e. 'red 1foo'
+ // i.e. 'red 1foo'
String text = getText(selectedRow, 2);
return Integer.parseInt(text.substring(4, 5));
@@ -127,13 +127,11 @@ public class TableClickAndDragOnIconAndComponentsTest extends MultiBrowserTest {
}
private List<WebElement> getCellContents(WebElement row) {
- return row.findElements(
- By.className("v-table-cell-content"));
+ return row.findElements(By.className("v-table-cell-content"));
}
private WebElement getSelectedRow() {
- return getTable().findElement(By
- .className("v-selected"));
+ return getTable().findElement(By.className("v-selected"));
}
private void clickOnTextField(int row) {
@@ -157,15 +155,13 @@ public class TableClickAndDragOnIconAndComponentsTest extends MultiBrowserTest {
}
private WebElement getElement(int row, int index, String className) {
- return getRows()
- .get(row)
- .findElements(By.className(className))
+ return getRows().get(row).findElements(By.className(className))
.get(index);
}
private List<WebElement> getRows() {
return getTable().findElement(By.className("v-table-body"))
- .findElements(By.tagName("tr"));
+ .findElements(By.tagName("tr"));
}
private void selectRow(int row) {
@@ -178,7 +174,6 @@ public class TableClickAndDragOnIconAndComponentsTest extends MultiBrowserTest {
return $(TableElement.class).first();
}
-
private void clickOnLabel(int row) {
WebElement label = getElement(row, "v-label");
label.click();
@@ -200,9 +195,9 @@ public class TableClickAndDragOnIconAndComponentsTest extends MultiBrowserTest {
private int getSelectedRowIndex() {
List<WebElement> rows = getRows();
- //Unfortunately rows.getIndexOf(getSelectedRow()) doesn't work.
- for(WebElement r : rows) {
- if(r.getAttribute("class").contains("v-selected")) {
+ // Unfortunately rows.getIndexOf(getSelectedRow()) doesn't work.
+ for (WebElement r : rows) {
+ if (r.getAttribute("class").contains("v-selected")) {
return rows.indexOf(r);
}
}
diff --git a/uitest/src/com/vaadin/tests/components/table/TableColumnResizeContentsWidthTest.java b/uitest/src/com/vaadin/tests/components/table/TableColumnResizeContentsWidthTest.java
index 3ae66de684..5faee3cc59 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableColumnResizeContentsWidthTest.java
+++ b/uitest/src/com/vaadin/tests/components/table/TableColumnResizeContentsWidthTest.java
@@ -42,7 +42,8 @@ public class TableColumnResizeContentsWidthTest extends MultiBrowserTest {
public List<DesiredCapabilities> getBrowsersToTest() {
List<DesiredCapabilities> browsersToTest = super.getBrowsersToTest();
- //Can't get IE8 to hit the resizer, extracted IE8 to it's own test class.
+ // Can't get IE8 to hit the resizer, extracted IE8 to it's own test
+ // class.
browsersToTest.remove(Browser.IE8.getDesiredCapabilities());
return browsersToTest;
@@ -54,7 +55,8 @@ public class TableColumnResizeContentsWidthTest extends MultiBrowserTest {
List<ButtonElement> buttons = $(ButtonElement.class).all();
- WebElement resizer = getTable().findElement(By.className("v-table-resizer"));
+ WebElement resizer = getTable().findElement(
+ By.className("v-table-resizer"));
assertEquals(100, getTextFieldWidth());
@@ -84,7 +86,8 @@ public class TableColumnResizeContentsWidthTest extends MultiBrowserTest {
private int getTextFieldWidth() {
TableElement table = getTable();
- final WebElement textField = table.findElement(By.className("v-textfield"));
+ final WebElement textField = table.findElement(By
+ .className("v-textfield"));
return textField.getSize().width;
}
@@ -94,8 +97,7 @@ public class TableColumnResizeContentsWidthTest extends MultiBrowserTest {
}
private void moveResizer(WebElement resizer, int offset) {
- new Actions(driver).clickAndHold(resizer).moveByOffset(offset, 0).release().perform();
+ new Actions(driver).clickAndHold(resizer).moveByOffset(offset, 0)
+ .release().perform();
}
}
-
-
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/ExtraScrollbarsInTabSheet.java b/uitest/src/com/vaadin/tests/components/tabsheet/ExtraScrollbarsInTabSheet.java
index fffc766e7c..63d50e0464 100755
--- a/uitest/src/com/vaadin/tests/components/tabsheet/ExtraScrollbarsInTabSheet.java
+++ b/uitest/src/com/vaadin/tests/components/tabsheet/ExtraScrollbarsInTabSheet.java
@@ -1,42 +1,42 @@
-package com.vaadin.tests.components.tabsheet;
-
-import com.vaadin.annotations.Theme;
-import com.vaadin.server.VaadinRequest;
-import com.vaadin.ui.HorizontalSplitPanel;
-import com.vaadin.ui.Panel;
-import com.vaadin.ui.TabSheet;
-import com.vaadin.ui.UI;
-import com.vaadin.ui.VerticalLayout;
-import com.vaadin.ui.themes.Runo;
-
-@Theme("runo")
-public class ExtraScrollbarsInTabSheet extends UI {
-
- @Override
- public void init(VaadinRequest request) {
-
- VerticalLayout vl = new VerticalLayout();
- vl.setSizeFull();
-
- HorizontalSplitPanel horizontalSplit = new HorizontalSplitPanel();
-
- TabSheet ts = new TabSheet();
-
- VerticalLayout tabContent = new VerticalLayout();
- tabContent.setSizeFull();
-
- Panel p = new Panel();
- p.addStyleName(Runo.PANEL_LIGHT);
- p.setHeight("400px");
- tabContent.addComponent(p);
-
- ts.addTab(tabContent);
- horizontalSplit.setSecondComponent(ts);
-
- vl.addComponent(horizontalSplit);
-
- setContent(vl);
-
- }
-
-}
+package com.vaadin.tests.components.tabsheet;
+
+import com.vaadin.annotations.Theme;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.ui.HorizontalSplitPanel;
+import com.vaadin.ui.Panel;
+import com.vaadin.ui.TabSheet;
+import com.vaadin.ui.UI;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.themes.Runo;
+
+@Theme("runo")
+public class ExtraScrollbarsInTabSheet extends UI {
+
+ @Override
+ public void init(VaadinRequest request) {
+
+ VerticalLayout vl = new VerticalLayout();
+ vl.setSizeFull();
+
+ HorizontalSplitPanel horizontalSplit = new HorizontalSplitPanel();
+
+ TabSheet ts = new TabSheet();
+
+ VerticalLayout tabContent = new VerticalLayout();
+ tabContent.setSizeFull();
+
+ Panel p = new Panel();
+ p.addStyleName(Runo.PANEL_LIGHT);
+ p.setHeight("400px");
+ tabContent.addComponent(p);
+
+ ts.addTab(tabContent);
+ horizontalSplit.setSecondComponent(ts);
+
+ vl.addComponent(horizontalSplit);
+
+ setContent(vl);
+
+ }
+
+}
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheet.java b/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheet.java
index c21c702bd0..3e132c583b 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheet.java
+++ b/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheet.java
@@ -18,18 +18,20 @@ public class FirstTabNotVisibleInTabsheet extends AbstractTestUI {
TabSheet tabSheet = new TabSheet();
tabSheet.setWidth("600px");
- firstTab = tabSheet.addTab(new Label("first visible tab"), "first visible tab");
+ firstTab = tabSheet.addTab(new Label("first visible tab"),
+ "first visible tab");
for (int i = 2; i < 10; i++) {
tabSheet.addTab(new Label("visible tab " + i), "visible tab " + i);
}
- addComponent(new VerticalLayout(tabSheet, new Button("Toggle first tab", new Button.ClickListener() {
- @Override
- public void buttonClick(Button.ClickEvent event) {
- firstTab.setVisible(!firstTab.isVisible());
- }
- })));
+ addComponent(new VerticalLayout(tabSheet, new Button(
+ "Toggle first tab", new Button.ClickListener() {
+ @Override
+ public void buttonClick(Button.ClickEvent event) {
+ firstTab.setVisible(!firstTab.isVisible());
+ }
+ })));
}
@Override
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheetTest.java b/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheetTest.java
index e57651ba03..99c47b1703 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheetTest.java
+++ b/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheetTest.java
@@ -1,6 +1,5 @@
package com.vaadin.tests.components.tabsheet;
-
import com.vaadin.testbench.elements.ButtonElement;
import com.vaadin.testbench.elements.TabSheetElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
@@ -17,8 +16,8 @@ public class FirstTabNotVisibleInTabsheetTest extends MultiBrowserTest {
TabSheetElement tabSheet = $(TabSheetElement.class).first();
- Assert.assertTrue("TabSheet should have first tab visible",
- tabSheet.getTabCaptions().contains("first visible tab"));
+ Assert.assertTrue("TabSheet should have first tab visible", tabSheet
+ .getTabCaptions().contains("first visible tab"));
}
private void toggleFirstTabVisibility() {
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.java b/uitest/src/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.java
index 3323d6a8d7..624fac6e75 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.java
+++ b/uitest/src/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.java
@@ -1,69 +1,69 @@
-package com.vaadin.tests.components.tabsheet;
-
-import com.vaadin.server.VaadinRequest;
-import com.vaadin.tests.components.AbstractTestUI;
-import com.vaadin.ui.Button;
-import com.vaadin.ui.Button.ClickEvent;
-import com.vaadin.ui.HorizontalLayout;
-import com.vaadin.ui.Label;
-import com.vaadin.ui.TabSheet;
-
-/**
- * Main UI class
- */
-@SuppressWarnings("serial")
-public class MoveComponentBetweenTabsheets extends AbstractTestUI {
-
- TabSheet left, right;
- private Label l1;
- private Label l2;
- private Label r1;
- private Label r2;
-
- void doTestOperation() {
- right.addTab(l1, "L1");
- right.setSelectedTab(l1);
- }
-
- @Override
- protected void setup(VaadinRequest request) {
-
- // TODO Auto-generated method stub
- Button button = new Button("Move L1 to the right tabsheet");
- button.addClickListener(new Button.ClickListener() {
- @Override
- public void buttonClick(ClickEvent event) {
- doTestOperation();
- }
- });
-
- getLayout().addComponent(button);
-
- left = new TabSheet();
- l1 = new Label("Left 1");
- left.addTab(l1, "L1");
- l2 = new Label("Left 2");
- left.addTab(l2, "L2");
- left.setWidth("400px");
-
- right = new TabSheet();
- r1 = new Label("Right 1");
- right.addTab(r1, "R1");
- r2 = new Label("Right 2");
- right.addTab(r2, "R2");
- right.setWidth("400px");
-
- getLayout().addComponent(new HorizontalLayout(left, right));
- }
-
- @Override
- protected String getTestDescription() {
- return "Moving a component from a tabsheet to another sometimes causes a client-side error";
- }
-
- @Override
- protected Integer getTicketNumber() {
- return 10839;
- }
-
-}
+package com.vaadin.tests.components.tabsheet;
+
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.TabSheet;
+
+/**
+ * Main UI class
+ */
+@SuppressWarnings("serial")
+public class MoveComponentBetweenTabsheets extends AbstractTestUI {
+
+ TabSheet left, right;
+ private Label l1;
+ private Label l2;
+ private Label r1;
+ private Label r2;
+
+ void doTestOperation() {
+ right.addTab(l1, "L1");
+ right.setSelectedTab(l1);
+ }
+
+ @Override
+ protected void setup(VaadinRequest request) {
+
+ // TODO Auto-generated method stub
+ Button button = new Button("Move L1 to the right tabsheet");
+ button.addClickListener(new Button.ClickListener() {
+ @Override
+ public void buttonClick(ClickEvent event) {
+ doTestOperation();
+ }
+ });
+
+ getLayout().addComponent(button);
+
+ left = new TabSheet();
+ l1 = new Label("Left 1");
+ left.addTab(l1, "L1");
+ l2 = new Label("Left 2");
+ left.addTab(l2, "L2");
+ left.setWidth("400px");
+
+ right = new TabSheet();
+ r1 = new Label("Right 1");
+ right.addTab(r1, "R1");
+ r2 = new Label("Right 2");
+ right.addTab(r2, "R2");
+ right.setWidth("400px");
+
+ getLayout().addComponent(new HorizontalLayout(left, right));
+ }
+
+ @Override
+ protected String getTestDescription() {
+ return "Moving a component from a tabsheet to another sometimes causes a client-side error";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 10839;
+ }
+
+}
diff --git a/uitest/src/com/vaadin/tests/components/textfield/LocaleChangeOnReadOnlyField.java b/uitest/src/com/vaadin/tests/components/textfield/LocaleChangeOnReadOnlyField.java
index a1cabe914e..06469550c9 100644
--- a/uitest/src/com/vaadin/tests/components/textfield/LocaleChangeOnReadOnlyField.java
+++ b/uitest/src/com/vaadin/tests/components/textfield/LocaleChangeOnReadOnlyField.java
@@ -1,6 +1,5 @@
package com.vaadin.tests.components.textfield;
-
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Button;
diff --git a/uitest/src/com/vaadin/tests/components/ui/UIAccessTest.java b/uitest/src/com/vaadin/tests/components/ui/UIAccessTest.java
index 9ecaa05315..0e37aa36fb 100644
--- a/uitest/src/com/vaadin/tests/components/ui/UIAccessTest.java
+++ b/uitest/src/com/vaadin/tests/components/ui/UIAccessTest.java
@@ -43,7 +43,7 @@ public class UIAccessTest extends MultiBrowserTest {
waitForLogToContainText("0. Current UI matches in beforeResponse? true");
waitForLogToContainText("1. Current session matches in beforeResponse? true");
}
-
+
@Test
public void canBeAccessedFromUIThread() {
$(ButtonElement.class).first().click();
@@ -96,7 +96,7 @@ public class UIAccessTest extends MultiBrowserTest {
waitForLogToContainText("1. Thread started, waiting for interruption");
waitForLogToContainText("2. I was interrupted");
}
-
+
@Test
public void testAccessSynchronously() {
$(ButtonElement.class).get(5).click();
@@ -106,7 +106,7 @@ public class UIAccessTest extends MultiBrowserTest {
assertTrue(logContainsText("2. has request after accessSynchronously? true"));
assertTrue(logContainsText("3. Test value after accessSynchornously: Set in accessSynchronosly"));
}
-
+
@Test
public void currentInstanceCanAccessValue() {
$(ButtonElement.class).get(6).click();
diff --git a/uitest/src/com/vaadin/tests/components/ui/UISerializationTest.java b/uitest/src/com/vaadin/tests/components/ui/UISerializationTest.java
index 2b6ba40e8c..649f48c9ce 100644
--- a/uitest/src/com/vaadin/tests/components/ui/UISerializationTest.java
+++ b/uitest/src/com/vaadin/tests/components/ui/UISerializationTest.java
@@ -1,20 +1,24 @@
package com.vaadin.tests.components.ui;
-import com.vaadin.testbench.elements.ButtonElement;
-import com.vaadin.tests.tb3.SingleBrowserTest;
-import org.junit.Ignore;
+import static org.hamcrest.Matchers.allOf;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.endsWith;
+import static org.hamcrest.Matchers.startsWith;
+import static org.junit.Assert.assertThat;
+
import org.junit.Test;
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.assertThat;
+import com.vaadin.testbench.elements.ButtonElement;
+import com.vaadin.tests.tb3.SingleBrowserTest;
public class UISerializationTest extends SingleBrowserTest {
@Test
- @Ignore //Broken on all browsers since 9696e6c3e7e952b66ac3f5c9ddc3dfca4233451e
- public void tb2test() throws Exception {
+ public void uiIsSerialized() throws Exception {
openTestURL();
- $(ButtonElement.class).first().click();
+
+ serialize();
+
assertThat(getLogRow(0), startsWith("3. Diff states match, size: "));
assertThat(getLogRow(1), startsWith("2. Deserialized UI in "));
assertThat(
@@ -22,4 +26,8 @@ public class UISerializationTest extends SingleBrowserTest {
allOf(startsWith("1. Serialized UI in"),
containsString(" into "), endsWith(" bytes")));
}
+
+ private void serialize() {
+ $(ButtonElement.class).first().click();
+ }
}
diff --git a/uitest/src/com/vaadin/tests/components/window/WindowBGColorChameleonIE8.java b/uitest/src/com/vaadin/tests/components/window/WindowBGColorChameleonIE8.java
new file mode 100644
index 0000000000..121d6300bc
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/window/WindowBGColorChameleonIE8.java
@@ -0,0 +1,27 @@
+package com.vaadin.tests.components.window;
+
+import com.vaadin.annotations.Theme;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.UI;
+import com.vaadin.ui.Window;
+
+@SuppressWarnings("serial")
+@Theme("chameleon")
+public class WindowBGColorChameleonIE8 extends AbstractTestUI {
+
+ @Override
+ protected void setup(VaadinRequest request) {
+
+ final Window window = new Window();
+ window.setCaption("Window");
+ window.setModal(true);
+ window.setClosable(true);
+ window.setDraggable(true);
+ window.setWidth("400px");
+ window.setHeight("300px");
+ window.center();
+ final UI ui = UI.getCurrent();
+ ui.addWindow(window);
+ }
+} \ No newline at end of file
diff --git a/uitest/src/com/vaadin/tests/components/window/WindowBGColorChameleonIE8Test.java b/uitest/src/com/vaadin/tests/components/window/WindowBGColorChameleonIE8Test.java
new file mode 100644
index 0000000000..18cb012cb2
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/window/WindowBGColorChameleonIE8Test.java
@@ -0,0 +1,32 @@
+package com.vaadin.tests.components.window;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.List;
+
+import org.junit.Test;
+import org.openqa.selenium.remote.DesiredCapabilities;
+
+import com.vaadin.tests.tb3.MultiBrowserTest;
+import com.vaadin.tests.tb3.SingleBrowserTest;
+
+public class WindowBGColorChameleonIE8Test extends SingleBrowserTest {
+
+ /*
+ * We care about IE8 here only (Or any very very old browsers)
+ *
+ * @see com.vaadin.tests.tb3.SingleBrowserTest#getBrowsersToTest()
+ */
+ @Override
+ public List<DesiredCapabilities> getBrowsersToTest() {
+
+ return Arrays.asList(MultiBrowserTest.Browser.IE8
+ .getDesiredCapabilities());
+ }
+
+ @Test
+ public void testWindowColor() throws IOException {
+ openTestURL();
+ compareScreen("grey-background-window");
+ }
+}
diff --git a/uitest/src/com/vaadin/tests/extensions/JavascriptManagerTest.java b/uitest/src/com/vaadin/tests/extensions/JavascriptManagerTest.java
index 4807bb9029..f2a8b24cb1 100644
--- a/uitest/src/com/vaadin/tests/extensions/JavascriptManagerTest.java
+++ b/uitest/src/com/vaadin/tests/extensions/JavascriptManagerTest.java
@@ -37,7 +37,8 @@ public class JavascriptManagerTest extends AbstractTestUI {
@Override
public void call(JsonArray arguments) {
log.log("Got " + arguments.length() + " arguments");
- log.log("Argument 1 as a number: " + (int) arguments.getNumber(0));
+ log.log("Argument 1 as a number: "
+ + (int) arguments.getNumber(0));
log.log("Argument 2 as a string: " + arguments.getString(1));
log.log("Argument 3.p as a boolean: "
+ arguments.getObject(2).getBoolean("p"));
diff --git a/uitest/src/com/vaadin/tests/fieldgroup/MultipleValidationErrors.java b/uitest/src/com/vaadin/tests/fieldgroup/MultipleValidationErrors.java
index 5110bf6dcf..58f2292f84 100644
--- a/uitest/src/com/vaadin/tests/fieldgroup/MultipleValidationErrors.java
+++ b/uitest/src/com/vaadin/tests/fieldgroup/MultipleValidationErrors.java
@@ -39,21 +39,27 @@ public class MultipleValidationErrors extends AbstractTestUI {
try {
fieldGroup.commit();
} catch (FieldGroup.CommitException e) {
- if (e.getCause() != null && e.getCause() instanceof Validator.InvalidValueException) {
- validationErrors.setValue(StringEscapeUtils.unescapeHtml(
- AbstractErrorMessage.getErrorMessageForException(e.getCause()).getFormattedHtmlMessage()));
+ if (e.getCause() != null
+ && e.getCause() instanceof Validator.InvalidValueException) {
+ validationErrors.setValue(StringEscapeUtils
+ .unescapeHtml(AbstractErrorMessage
+ .getErrorMessageForException(
+ e.getCause())
+ .getFormattedHtmlMessage()));
}
}
-
}
});
}
- private void bindTextField(BeanItem<PersonBeanWithValidationAnnotations> item, FieldGroup fieldGroup,
- String caption, String propertyId) {
- TextField textfield = new TextField(caption, item.getItemProperty(propertyId));
- textfield.addValidator(new BeanValidator(PersonBeanWithValidationAnnotations.class, propertyId));
+ private void bindTextField(
+ BeanItem<PersonBeanWithValidationAnnotations> item,
+ FieldGroup fieldGroup, String caption, String propertyId) {
+ TextField textfield = new TextField(caption,
+ item.getItemProperty(propertyId));
+ textfield.addValidator(new BeanValidator(
+ PersonBeanWithValidationAnnotations.class, propertyId));
fieldGroup.bind(textfield, propertyId);
diff --git a/uitest/src/com/vaadin/tests/fieldgroup/MultipleValidationErrorsTest.java b/uitest/src/com/vaadin/tests/fieldgroup/MultipleValidationErrorsTest.java
index 175b650be6..14527cff04 100644
--- a/uitest/src/com/vaadin/tests/fieldgroup/MultipleValidationErrorsTest.java
+++ b/uitest/src/com/vaadin/tests/fieldgroup/MultipleValidationErrorsTest.java
@@ -16,7 +16,8 @@ public class MultipleValidationErrorsTest extends MultiBrowserTest {
}
private void clearTextField(String caption) {
- TextFieldElement textField = $(TextFieldElement.class).caption(caption).first();
+ TextFieldElement textField = $(TextFieldElement.class).caption(caption)
+ .first();
textField.clear();
}
@@ -29,9 +30,14 @@ public class MultipleValidationErrorsTest extends MultiBrowserTest {
commitTextFields();
- String validationErrors = $(LabelElement.class).id("validationErrors").getText();
+ String validationErrors = $(LabelElement.class).id("validationErrors")
+ .getText();
- assertThat(validationErrors, containsString(MultipleValidationErrors.FIRST_NAME_NOT_EMPTY_VALIDATION_MESSAGE));
- assertThat(validationErrors, containsString(MultipleValidationErrors.LAST_NAME_NOT_EMPTY_VALIDATION_MESSAGE));
+ assertThat(
+ validationErrors,
+ containsString(MultipleValidationErrors.FIRST_NAME_NOT_EMPTY_VALIDATION_MESSAGE));
+ assertThat(
+ validationErrors,
+ containsString(MultipleValidationErrors.LAST_NAME_NOT_EMPTY_VALIDATION_MESSAGE));
}
}
diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7a3/JSAPIUI.java b/uitest/src/com/vaadin/tests/minitutorials/v7a3/JSAPIUI.java
index e98fe6d066..ea9cd52d34 100644
--- a/uitest/src/com/vaadin/tests/minitutorials/v7a3/JSAPIUI.java
+++ b/uitest/src/com/vaadin/tests/minitutorials/v7a3/JSAPIUI.java
@@ -28,7 +28,8 @@ public class JSAPIUI extends UI {
} else {
// type should be in [1]
Notification.show(caption,
- Type.values()[((int) arguments.getNumber(1))]);
+ Type.values()[((int) arguments
+ .getNumber(1))]);
}
} catch (JsonException e) {
diff --git a/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersLongPollingTest.java b/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersLongPollingTest.java
index fd89982253..c00f95a950 100644
--- a/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersLongPollingTest.java
+++ b/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersLongPollingTest.java
@@ -1,6 +1,7 @@
package com.vaadin.tests.push;
-public class SendMultibyteCharactersLongPollingTest extends SendMultibyteCharactersTest {
+public class SendMultibyteCharactersLongPollingTest extends
+ SendMultibyteCharactersTest {
@Override
protected String getTransport() {
diff --git a/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersStreamingTest.java b/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersStreamingTest.java
index 7b9ec38487..bc1debb9da 100644
--- a/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersStreamingTest.java
+++ b/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersStreamingTest.java
@@ -1,6 +1,7 @@
package com.vaadin.tests.push;
-public class SendMultibyteCharactersStreamingTest extends SendMultibyteCharactersTest {
+public class SendMultibyteCharactersStreamingTest extends
+ SendMultibyteCharactersTest {
@Override
protected String getTransport() {
diff --git a/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersTest.java b/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersTest.java
index 1ced2fb506..a639f7dbe3 100644
--- a/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersTest.java
+++ b/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersTest.java
@@ -25,7 +25,7 @@ public abstract class SendMultibyteCharactersTest extends MultiBrowserTest {
TextAreaElement textArea = $(TextAreaElement.class).first();
StringBuilder text = new StringBuilder();
- for(int i=0;i < 20;i++) {
+ for (int i = 0; i < 20; i++) {
text.append("之は日本語です、テストです。");
}
diff --git a/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersWebSocketTest.java b/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersWebSocketTest.java
index f37fb2efcb..f9ae472b99 100644
--- a/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersWebSocketTest.java
+++ b/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersWebSocketTest.java
@@ -1,11 +1,11 @@
package com.vaadin.tests.push;
-
import org.openqa.selenium.remote.DesiredCapabilities;
import java.util.List;
-public class SendMultibyteCharactersWebSocketTest extends SendMultibyteCharactersTest {
+public class SendMultibyteCharactersWebSocketTest extends
+ SendMultibyteCharactersTest {
@Override
public List<DesiredCapabilities> getBrowsersToTest() {
diff --git a/uitest/src/com/vaadin/tests/requesthandlers/CommunicationError.java b/uitest/src/com/vaadin/tests/requesthandlers/CommunicationError.java
new file mode 100644
index 0000000000..31ec7658ee
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/requesthandlers/CommunicationError.java
@@ -0,0 +1,107 @@
+/*
+ * 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.requesthandlers;
+
+import com.vaadin.launcher.ApplicationRunnerServlet;
+import com.vaadin.server.CustomizedSystemMessages;
+import com.vaadin.server.SystemMessages;
+import com.vaadin.server.UIClassSelectionEvent;
+import com.vaadin.server.UIProvider;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.server.VaadinService;
+import com.vaadin.server.VaadinServletRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.UI;
+
+/**
+ * Test UI provider to check communication error json object null values.
+ *
+ * @author Vaadin Ltd
+ */
+public class CommunicationError extends UIProvider {
+
+ @Override
+ public Class<? extends UI> getUIClass(UIClassSelectionEvent event) {
+ VaadinServletRequest request = (VaadinServletRequest) event
+ .getRequest();
+ String currentUrl = request.getRequestURL().toString();
+ StringBuilder redirectClass = new StringBuilder(
+ CommunicationError.class.getSimpleName());
+ redirectClass.append('$');
+ redirectClass.append(RedirectedUI.class.getSimpleName());
+
+ String restartApplication = "?restartApplication";
+ if (!currentUrl.contains(restartApplication)) {
+ redirectClass.append(restartApplication);
+ }
+ final String url = currentUrl.replace(
+ CommunicationError.class.getSimpleName(), redirectClass);
+
+ request.setAttribute(
+ ApplicationRunnerServlet.CUSTOM_SYSTEM_MESSAGES_PROPERTY,
+ createSystemMessages(url));
+
+ return CommunicationErrorUI.class;
+ }
+
+ public static class CommunicationErrorUI extends AbstractTestUI {
+
+ @Override
+ protected void setup(VaadinRequest request) {
+ Button button = new Button("Send bad request",
+ new Button.ClickListener() {
+
+ @Override
+ public void buttonClick(ClickEvent event) {
+ VaadinService.getCurrentResponse().setStatus(400);
+ }
+ });
+ addComponent(button);
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 14594;
+ }
+
+ @Override
+ protected String getTestDescription() {
+ return "Null values should be wrapped into JsonNull objects.";
+ }
+ }
+
+ public static class RedirectedUI extends UI {
+
+ @Override
+ protected void init(VaadinRequest request) {
+ Label label = new Label("redirected");
+ label.addStyleName("redirected");
+ setContent(label);
+ }
+
+ }
+
+ private SystemMessages createSystemMessages(String url) {
+ CustomizedSystemMessages messages = new CustomizedSystemMessages();
+ messages.setCommunicationErrorCaption(null);
+ messages.setCommunicationErrorMessage(null);
+ messages.setCommunicationErrorURL(url);
+ return messages;
+ }
+}
diff --git a/uitest/src/com/vaadin/tests/requesthandlers/CommunicationErrorTest.java b/uitest/src/com/vaadin/tests/requesthandlers/CommunicationErrorTest.java
new file mode 100644
index 0000000000..f295ec5ba3
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/requesthandlers/CommunicationErrorTest.java
@@ -0,0 +1,41 @@
+/*
+ * 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.requesthandlers;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openqa.selenium.By;
+
+import com.vaadin.testbench.elements.ButtonElement;
+import com.vaadin.tests.tb3.MultiBrowserTest;
+
+/**
+ * Test for null values in communication error json object .
+ *
+ * @author Vaadin Ltd
+ */
+public class CommunicationErrorTest extends MultiBrowserTest {
+
+ @Test
+ public void testRedirection() {
+ openTestURL();
+
+ $(ButtonElement.class).first().click();
+
+ Assert.assertTrue(isElementPresent(By.className("redirected")));
+ }
+
+}
diff --git a/uitest/src/com/vaadin/tests/serialization/SerializerTest.java b/uitest/src/com/vaadin/tests/serialization/SerializerTest.java
index df37601f23..2ac10c161d 100644
--- a/uitest/src/com/vaadin/tests/serialization/SerializerTest.java
+++ b/uitest/src/com/vaadin/tests/serialization/SerializerTest.java
@@ -17,9 +17,11 @@
package com.vaadin.tests.serialization;
import java.text.DateFormat;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
+import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
@@ -387,9 +389,17 @@ public class SerializerTest extends AbstractTestUI {
@Override
public void sendSet(Set<Integer> intSet,
Set<Connector> connectorSet, Set<SimpleTestBean> beanSet) {
- log.log("sendSet: " + intSet + ", "
- + connectorCollectionToString(connectorSet) + ", "
- + beanSet);
+ List<Integer> intList = new ArrayList<Integer>(intSet);
+ Collections.sort(intList);
+ List<Connector> connectorList = new ArrayList<Connector>(
+ connectorSet);
+ Collections.sort(connectorList, new ConnectorComparator());
+ List<SimpleTestBean> beanList = new ArrayList<SimpleTestBean>(
+ beanSet);
+ Collections.sort(beanList, new SimpleBeanComparator());
+ log.log("sendSet: " + intList + ", "
+ + connectorCollectionToString(connectorList) + ", "
+ + beanList);
}
@Override
@@ -483,4 +493,19 @@ public class SerializerTest extends AbstractTestUI {
return Integer.valueOf(8655);
}
+ private static class ConnectorComparator implements Comparator<Connector> {
+
+ @Override
+ public int compare(Connector o1, Connector o2) {
+ return o1.getConnectorId().compareTo(o2.getConnectorId());
+ }
+ }
+
+ private static class SimpleBeanComparator implements
+ Comparator<SimpleTestBean> {
+ @Override
+ public int compare(SimpleTestBean o1, SimpleTestBean o2) {
+ return Integer.valueOf(o1.getValue()).compareTo(o2.getValue());
+ }
+ }
}
diff --git a/uitest/src/com/vaadin/tests/serialization/SerializerTestTest.java b/uitest/src/com/vaadin/tests/serialization/SerializerTestTest.java
index a5216546b3..23af74c78b 100644
--- a/uitest/src/com/vaadin/tests/serialization/SerializerTestTest.java
+++ b/uitest/src/com/vaadin/tests/serialization/SerializerTestTest.java
@@ -92,8 +92,10 @@ public class SerializerTestTest extends MultiBrowserTest {
getLogRow(logRow++));
Assert.assertEquals("state.floatArray: [57, 0, -12]",
getLogRow(logRow++));
- Assert.assertTrue(getLogRow(logRow++).startsWith("state.floatObjectValue: 1.0000001"));
- Assert.assertTrue(getLogRow(logRow++).startsWith("state.floatValue: 3.14159"));
+ Assert.assertTrue(getLogRow(logRow++).startsWith(
+ "state.floatObjectValue: 1.0000001"));
+ Assert.assertTrue(getLogRow(logRow++).startsWith(
+ "state.floatValue: 3.14159"));
Assert.assertEquals("state.longArray: [-57841235865, 57]",
getLogRow(logRow++));
Assert.assertEquals("state.longObjectValue: 577431841360",
diff --git a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
index b5a345bd30..2e3d25cbbe 100644
--- a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
+++ b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
@@ -837,7 +837,8 @@ public abstract class AbstractTB3Test extends TestBenchTestCase {
runPath = "/run-push";
}
- if (UI.class.isAssignableFrom(uiClass)) {
+ if (UI.class.isAssignableFrom(uiClass)
+ || UIProvider.class.isAssignableFrom(uiClass)) {
return runPath + "/" + uiClass.getCanonicalName()
+ (isDebug() ? "?debug" : "");
} else if (LegacyApplication.class.isAssignableFrom(uiClass)) {
diff --git a/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java b/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java
index ebcb02002e..5a25a4ebb8 100644
--- a/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java
+++ b/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java
@@ -41,7 +41,8 @@ import org.openqa.selenium.remote.DesiredCapabilities;
public abstract class MultiBrowserTest extends PrivateTB3Configuration {
protected List<DesiredCapabilities> getBrowsersSupportingWebSocket() {
- List<DesiredCapabilities> browsers = new ArrayList<DesiredCapabilities>(getAllBrowsers());
+ List<DesiredCapabilities> browsers = new ArrayList<DesiredCapabilities>(
+ getAllBrowsers());
browsers.remove(Browser.IE8.getDesiredCapabilities());
browsers.remove(Browser.IE9.getDesiredCapabilities());
@@ -51,7 +52,8 @@ public abstract class MultiBrowserTest extends PrivateTB3Configuration {
}
protected List<DesiredCapabilities> getBrowsersExcludingPhantomJS() {
- List<DesiredCapabilities> browsers = new ArrayList<DesiredCapabilities>(getAllBrowsers());
+ List<DesiredCapabilities> browsers = new ArrayList<DesiredCapabilities>(
+ getAllBrowsers());
browsers.remove(Browser.PHANTOMJS.getDesiredCapabilities());
@@ -59,7 +61,8 @@ public abstract class MultiBrowserTest extends PrivateTB3Configuration {
}
protected List<DesiredCapabilities> getBrowsersExcludingIE() {
- List<DesiredCapabilities> browsers = new ArrayList<DesiredCapabilities>(getAllBrowsers());
+ List<DesiredCapabilities> browsers = new ArrayList<DesiredCapabilities>(
+ getAllBrowsers());
browsers.remove(Browser.IE8.getDesiredCapabilities());
browsers.remove(Browser.IE9.getDesiredCapabilities());
browsers.remove(Browser.IE10.getDesiredCapabilities());
@@ -69,14 +72,15 @@ public abstract class MultiBrowserTest extends PrivateTB3Configuration {
}
protected List<DesiredCapabilities> getBrowsersSupportingShiftClick() {
- List<DesiredCapabilities> browsers = new ArrayList<DesiredCapabilities>(getAllBrowsers());
+ List<DesiredCapabilities> browsers = new ArrayList<DesiredCapabilities>(
+ getAllBrowsers());
- //IE supports shift click only when require window focus is true
+ // IE supports shift click only when require window focus is true
browsers.remove(Browser.FIREFOX.getDesiredCapabilities());
browsers.remove(Browser.PHANTOMJS.getDesiredCapabilities());
- return browsers;
- }
+ return browsers;
+ }
protected List<DesiredCapabilities> getIEBrowsersOnly() {
List<DesiredCapabilities> browsers = new ArrayList<DesiredCapabilities>();
@@ -88,7 +92,6 @@ public abstract class MultiBrowserTest extends PrivateTB3Configuration {
return browsers;
}
-
public enum Browser {
FIREFOX(BrowserUtil.firefox(24)), CHROME(BrowserUtil.chrome(33)), SAFARI(
BrowserUtil.safari(7)), IE8(BrowserUtil.ie(8)), IE9(BrowserUtil
diff --git a/uitest/src/com/vaadin/tests/tb3/RetryOnFail.java b/uitest/src/com/vaadin/tests/tb3/RetryOnFail.java
index 3c22057863..7a1656a0d2 100644
--- a/uitest/src/com/vaadin/tests/tb3/RetryOnFail.java
+++ b/uitest/src/com/vaadin/tests/tb3/RetryOnFail.java
@@ -50,9 +50,10 @@ public class RetryOnFail implements TestRule {
}
private int getRetryCount() {
- String retryCount = System.getProperty("com.vaadin.testbench.max.retries");
+ String retryCount = System
+ .getProperty("com.vaadin.testbench.max.retries");
- if(retryCount != null && retryCount != "") {
+ if (retryCount != null && retryCount != "") {
return Integer.parseInt(retryCount);
}
diff --git a/uitest/src/com/vaadin/tests/tb3/WebsocketTest.java b/uitest/src/com/vaadin/tests/tb3/WebsocketTest.java
index ddcc6d5d76..7f65357a65 100644
--- a/uitest/src/com/vaadin/tests/tb3/WebsocketTest.java
+++ b/uitest/src/com/vaadin/tests/tb3/WebsocketTest.java
@@ -39,6 +39,7 @@ public abstract class WebsocketTest extends MultiBrowserTest {
@Override
public List<DesiredCapabilities> getBrowsersToTest() {
- return new ArrayList<DesiredCapabilities>(getBrowsersSupportingWebSocket());
+ return new ArrayList<DesiredCapabilities>(
+ getBrowsersSupportingWebSocket());
}
}
diff --git a/uitest/src/com/vaadin/tests/themes/FaviconTest.java b/uitest/src/com/vaadin/tests/themes/FaviconTest.java
index 31134f656f..3ba86fd3e4 100644
--- a/uitest/src/com/vaadin/tests/themes/FaviconTest.java
+++ b/uitest/src/com/vaadin/tests/themes/FaviconTest.java
@@ -44,8 +44,10 @@ public class FaviconTest extends SingleBrowserTest {
private int getResponseCode(String theme) {
try {
- URL url = new URL(String.format("%s/VAADIN/themes/%s/favicon.ico", getBaseURL(), theme));
- HttpURLConnection connection = (HttpURLConnection)url.openConnection();
+ URL url = new URL(String.format("%s/VAADIN/themes/%s/favicon.ico",
+ getBaseURL(), theme));
+ HttpURLConnection connection = (HttpURLConnection) url
+ .openConnection();
connection.setRequestMethod("GET");
connection.connect();
diff --git a/uitest/src/com/vaadin/tests/themes/chameleon/ChameleonNotification.java b/uitest/src/com/vaadin/tests/themes/chameleon/ChameleonNotification.java
index efb953530c..fc26a7b4f4 100644
--- a/uitest/src/com/vaadin/tests/themes/chameleon/ChameleonNotification.java
+++ b/uitest/src/com/vaadin/tests/themes/chameleon/ChameleonNotification.java
@@ -12,7 +12,6 @@ public class ChameleonNotification extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
-
addButton("Notification", new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent event) {
diff --git a/uitest/src/com/vaadin/tests/themes/chameleon/ChameleonNotificationTest.java b/uitest/src/com/vaadin/tests/themes/chameleon/ChameleonNotificationTest.java
index ef41ef3df9..46c7382726 100644
--- a/uitest/src/com/vaadin/tests/themes/chameleon/ChameleonNotificationTest.java
+++ b/uitest/src/com/vaadin/tests/themes/chameleon/ChameleonNotificationTest.java
@@ -16,8 +16,8 @@ public class ChameleonNotificationTest extends MultiBrowserTest {
openTestURL();
$(ButtonElement.class).first().click();
- NotificationElement notificationElement
- = $(NotificationElement.class).first();
+ NotificationElement notificationElement = $(NotificationElement.class)
+ .first();
assertThat(notificationElement.getCssValue("background-image"),
containsString("chameleon/img/grad"));
diff --git a/uitest/src/com/vaadin/tests/themes/valo/ModalWindowTest.java b/uitest/src/com/vaadin/tests/themes/valo/ModalWindowTest.java
index b97ce43ed6..0b21d4f34c 100644
--- a/uitest/src/com/vaadin/tests/themes/valo/ModalWindowTest.java
+++ b/uitest/src/com/vaadin/tests/themes/valo/ModalWindowTest.java
@@ -23,9 +23,11 @@ public class ModalWindowTest extends SingleBrowserTest {
openModalWindow();
- WebElement modalityCurtain = findElement(By.className("v-window-modalitycurtain"));
+ WebElement modalityCurtain = findElement(By
+ .className("v-window-modalitycurtain"));
- assertThat(modalityCurtain.getCssValue("-webkit-animation-name"), is("none"));
+ assertThat(modalityCurtain.getCssValue("-webkit-animation-name"),
+ is("none"));
}
private void openModalWindow() {
diff --git a/uitest/src/com/vaadin/tests/themes/valo/TableSortIndicator.java b/uitest/src/com/vaadin/tests/themes/valo/TableSortIndicator.java
index 74e5fcd0ef..8e873b0f1a 100644
--- a/uitest/src/com/vaadin/tests/themes/valo/TableSortIndicator.java
+++ b/uitest/src/com/vaadin/tests/themes/valo/TableSortIndicator.java
@@ -12,8 +12,8 @@ public class TableSortIndicator extends AbstractTestUI {
Table table = new Table();
table.addContainerProperty("Index", Integer.class, "");
- for(int i=0;i<10;i++) {
- table.addItem(new Object[] {i}, i);
+ for (int i = 0; i < 10; i++) {
+ table.addItem(new Object[] { i }, i);
}
table.setPageLength(0);
@@ -23,8 +23,8 @@ public class TableSortIndicator extends AbstractTestUI {
@Override
protected String getTestDescription() {
- return "For Valo, sorting indicators should point up when sorted asc " +
- "and down when sorted desc.";
+ return "For Valo, sorting indicators should point up when sorted asc "
+ + "and down when sorted desc.";
}
@Override
diff --git a/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_NextYearClickableIfRangeAcceptsFractionOfNextYear.html b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_NextYearClickableIfRangeAcceptsFractionOfNextYear.html
index f5d7ee97ca..5304a5af38 100644
--- a/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_NextYearClickableIfRangeAcceptsFractionOfNextYear.html
+++ b/uitest/tb2/com/vaadin/tests/components/datefield/DateFieldRanges_NextYearClickableIfRangeAcceptsFractionOfNextYear.html
@@ -134,7 +134,7 @@
<tr>
<td>select</td>
<td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldRanges::PID_SresoSelect/domChild[0]</td>
- <td>label=MONTH</td>
+ <td>label=Month</td>
</tr>
<tr>
<td>mouseClick</td>
@@ -164,7 +164,7 @@
<tr>
<td>select</td>
<td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldRanges::PID_SresoSelect/domChild[0]</td>
- <td>label=YEAR</td>
+ <td>label=Year</td>
</tr>
<tr>
<td>mouseClick</td>