diff options
author | Leif Åstrand <leif@vaadin.com> | 2014-05-16 09:38:58 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-05-16 11:52:05 +0000 |
commit | 9f19979ed856e3b002eb4066e157e7e0ab24fb95 (patch) | |
tree | 3e5ab7ded398f0fd5491143463b0528345fd442e /server | |
parent | 6e799c713752af6c05e6028145a665ce70dfdf40 (diff) | |
download | vaadin-framework-9f19979ed856e3b002eb4066e157e7e0ab24fb95.tar.gz vaadin-framework-9f19979ed856e3b002eb4066e157e7e0ab24fb95.zip |
Don't use deprecated Assert class
Change-Id: I0dbef06d0fa319628f6fa528f5ab3adfd5752c11
Diffstat (limited to 'server')
35 files changed, 43 insertions, 54 deletions
diff --git a/server/tests/src/com/vaadin/data/DefaultFieldGroupFieldFactoryTest.java b/server/tests/src/com/vaadin/data/DefaultFieldGroupFieldFactoryTest.java index cc1de6560f..a5fee5175e 100644 --- a/server/tests/src/com/vaadin/data/DefaultFieldGroupFieldFactoryTest.java +++ b/server/tests/src/com/vaadin/data/DefaultFieldGroupFieldFactoryTest.java @@ -17,8 +17,7 @@ package com.vaadin.data; import java.util.Date; -import junit.framework.Assert; - +import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/server/tests/src/com/vaadin/data/fieldgroup/BeanFieldGroupTest.java b/server/tests/src/com/vaadin/data/fieldgroup/BeanFieldGroupTest.java index a01c2dea8f..3333cd7744 100644 --- a/server/tests/src/com/vaadin/data/fieldgroup/BeanFieldGroupTest.java +++ b/server/tests/src/com/vaadin/data/fieldgroup/BeanFieldGroupTest.java @@ -15,8 +15,7 @@ */ package com.vaadin.data.fieldgroup; -import junit.framework.Assert; - +import org.junit.Assert; import org.junit.Test; public class BeanFieldGroupTest { diff --git a/server/tests/src/com/vaadin/data/fieldgroup/FieldGroupDate.java b/server/tests/src/com/vaadin/data/fieldgroup/FieldGroupDate.java index 951fc20c42..07e36b93f9 100644 --- a/server/tests/src/com/vaadin/data/fieldgroup/FieldGroupDate.java +++ b/server/tests/src/com/vaadin/data/fieldgroup/FieldGroupDate.java @@ -17,8 +17,7 @@ package com.vaadin.data.fieldgroup; import java.util.Date; -import junit.framework.Assert; - +import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/server/tests/src/com/vaadin/data/util/AbstractContainerTest.java b/server/tests/src/com/vaadin/data/util/AbstractContainerTest.java index 81c90ba07b..a443499a89 100644 --- a/server/tests/src/com/vaadin/data/util/AbstractContainerTest.java +++ b/server/tests/src/com/vaadin/data/util/AbstractContainerTest.java @@ -3,9 +3,10 @@ package com.vaadin.data.util; import java.util.ArrayList; import java.util.List; -import junit.framework.Assert; import junit.framework.TestCase; +import org.junit.Assert; + import com.vaadin.data.Container; import com.vaadin.data.Container.Filterable; import com.vaadin.data.Container.ItemSetChangeEvent; diff --git a/server/tests/src/com/vaadin/data/util/BeanContainerTest.java b/server/tests/src/com/vaadin/data/util/BeanContainerTest.java index a6c3bb0b8b..4e0e98ec43 100644 --- a/server/tests/src/com/vaadin/data/util/BeanContainerTest.java +++ b/server/tests/src/com/vaadin/data/util/BeanContainerTest.java @@ -7,7 +7,7 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; -import junit.framework.Assert; +import org.junit.Assert; import com.vaadin.data.Container; import com.vaadin.data.Item; diff --git a/server/tests/src/com/vaadin/data/util/BeanItemContainerSortTest.java b/server/tests/src/com/vaadin/data/util/BeanItemContainerSortTest.java index 346e931f61..4f4e35258f 100644 --- a/server/tests/src/com/vaadin/data/util/BeanItemContainerSortTest.java +++ b/server/tests/src/com/vaadin/data/util/BeanItemContainerSortTest.java @@ -7,8 +7,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import junit.framework.Assert; - +import org.junit.Assert; import org.junit.Test; public class BeanItemContainerSortTest { diff --git a/server/tests/src/com/vaadin/data/util/BeanItemContainerTest.java b/server/tests/src/com/vaadin/data/util/BeanItemContainerTest.java index c7d992dbeb..b58d962d96 100644 --- a/server/tests/src/com/vaadin/data/util/BeanItemContainerTest.java +++ b/server/tests/src/com/vaadin/data/util/BeanItemContainerTest.java @@ -8,7 +8,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import junit.framework.Assert; +import org.junit.Assert; import com.vaadin.data.Container; import com.vaadin.data.Item; diff --git a/server/tests/src/com/vaadin/data/util/BeanItemTest.java b/server/tests/src/com/vaadin/data/util/BeanItemTest.java index e1ad75796c..b458856826 100644 --- a/server/tests/src/com/vaadin/data/util/BeanItemTest.java +++ b/server/tests/src/com/vaadin/data/util/BeanItemTest.java @@ -9,9 +9,10 @@ import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; -import junit.framework.Assert; import junit.framework.TestCase; +import org.junit.Assert; + /** * Test BeanItem specific features. * diff --git a/server/tests/src/com/vaadin/data/util/PerformanceTestIndexedContainer.java b/server/tests/src/com/vaadin/data/util/PerformanceTestIndexedContainer.java index 35335edd23..1c49017bf1 100644 --- a/server/tests/src/com/vaadin/data/util/PerformanceTestIndexedContainer.java +++ b/server/tests/src/com/vaadin/data/util/PerformanceTestIndexedContainer.java @@ -6,9 +6,10 @@ import java.util.Collections; import java.util.SortedSet; import java.util.TreeSet; -import junit.framework.Assert; import junit.framework.TestCase; +import org.junit.Assert; + public class PerformanceTestIndexedContainer extends TestCase { private static final int REPEATS = 10; diff --git a/server/tests/src/com/vaadin/data/util/PropertyDescriptorTest.java b/server/tests/src/com/vaadin/data/util/PropertyDescriptorTest.java index 12ded84fe2..68861536a9 100644 --- a/server/tests/src/com/vaadin/data/util/PropertyDescriptorTest.java +++ b/server/tests/src/com/vaadin/data/util/PropertyDescriptorTest.java @@ -7,9 +7,10 @@ import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; -import junit.framework.Assert; import junit.framework.TestCase; +import org.junit.Assert; + import com.vaadin.data.Property; import com.vaadin.data.util.NestedMethodPropertyTest.Person; diff --git a/server/tests/src/com/vaadin/data/util/PropertySetItemTest.java b/server/tests/src/com/vaadin/data/util/PropertySetItemTest.java index a3169332ec..ff83db4437 100644 --- a/server/tests/src/com/vaadin/data/util/PropertySetItemTest.java +++ b/server/tests/src/com/vaadin/data/util/PropertySetItemTest.java @@ -2,10 +2,10 @@ package com.vaadin.data.util; import java.util.Iterator; -import junit.framework.Assert; import junit.framework.TestCase; import org.easymock.EasyMock; +import org.junit.Assert; import com.vaadin.data.Item.PropertySetChangeEvent; import com.vaadin.data.Item.PropertySetChangeListener; diff --git a/server/tests/src/com/vaadin/data/util/TestIndexedContainer.java b/server/tests/src/com/vaadin/data/util/TestIndexedContainer.java index 09e5a26c15..eacee7e301 100644 --- a/server/tests/src/com/vaadin/data/util/TestIndexedContainer.java +++ b/server/tests/src/com/vaadin/data/util/TestIndexedContainer.java @@ -2,7 +2,7 @@ package com.vaadin.data.util; import java.util.List; -import junit.framework.Assert; +import org.junit.Assert; import com.vaadin.data.Item; 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 fdd5b8a645..e5bc622e39 100644 --- a/server/tests/src/com/vaadin/data/util/filter/AndOrFilterTest.java +++ b/server/tests/src/com/vaadin/data/util/filter/AndOrFilterTest.java @@ -1,6 +1,6 @@ package com.vaadin.data.util.filter; -import junit.framework.Assert; +import org.junit.Assert; import com.vaadin.data.Container.Filter; import com.vaadin.data.Item; 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 b7ccd68429..732a541c89 100644 --- a/server/tests/src/com/vaadin/data/util/filter/CompareFilterTest.java +++ b/server/tests/src/com/vaadin/data/util/filter/CompareFilterTest.java @@ -3,7 +3,7 @@ package com.vaadin.data.util.filter; import java.math.BigDecimal; import java.util.Date; -import junit.framework.Assert; +import org.junit.Assert; import com.vaadin.data.Container.Filter; import com.vaadin.data.Item; 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 6f90273de1..d3e959e069 100644 --- a/server/tests/src/com/vaadin/data/util/filter/IsNullFilterTest.java +++ b/server/tests/src/com/vaadin/data/util/filter/IsNullFilterTest.java @@ -1,6 +1,6 @@ package com.vaadin.data.util.filter; -import junit.framework.Assert; +import org.junit.Assert; import com.vaadin.data.Container.Filter; import com.vaadin.data.Item; 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 b0c96b6f9c..0fcbd26b8e 100644 --- a/server/tests/src/com/vaadin/data/util/filter/LikeFilterTest.java +++ b/server/tests/src/com/vaadin/data/util/filter/LikeFilterTest.java @@ -16,7 +16,7 @@ package com.vaadin.data.util.filter; -import junit.framework.Assert; +import org.junit.Assert; import com.vaadin.data.Item; import com.vaadin.data.util.ObjectProperty; 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 c3b666e6f7..966ffd3a6e 100644 --- a/server/tests/src/com/vaadin/data/util/filter/NotFilterTest.java +++ b/server/tests/src/com/vaadin/data/util/filter/NotFilterTest.java @@ -1,6 +1,6 @@ package com.vaadin.data.util.filter; -import junit.framework.Assert; +import org.junit.Assert; import com.vaadin.data.Container.Filter; import com.vaadin.data.Item; 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 bc63d57752..eb7dff6015 100644 --- a/server/tests/src/com/vaadin/data/util/filter/SimpleStringFilterTest.java +++ b/server/tests/src/com/vaadin/data/util/filter/SimpleStringFilterTest.java @@ -1,6 +1,6 @@ package com.vaadin.data.util.filter; -import junit.framework.Assert; +import org.junit.Assert; public class SimpleStringFilterTest extends AbstractFilterTest<SimpleStringFilter> { diff --git a/server/tests/src/com/vaadin/data/util/sqlcontainer/ReadOnlyRowIdTest.java b/server/tests/src/com/vaadin/data/util/sqlcontainer/ReadOnlyRowIdTest.java index 63716bb33b..248dc62d93 100644 --- a/server/tests/src/com/vaadin/data/util/sqlcontainer/ReadOnlyRowIdTest.java +++ b/server/tests/src/com/vaadin/data/util/sqlcontainer/ReadOnlyRowIdTest.java @@ -1,7 +1,6 @@ package com.vaadin.data.util.sqlcontainer; -import junit.framework.Assert; - +import org.junit.Assert; import org.junit.Test; public class ReadOnlyRowIdTest { diff --git a/server/tests/src/com/vaadin/data/util/sqlcontainer/UtilTest.java b/server/tests/src/com/vaadin/data/util/sqlcontainer/UtilTest.java index 0187f9068e..a575d649f1 100644 --- a/server/tests/src/com/vaadin/data/util/sqlcontainer/UtilTest.java +++ b/server/tests/src/com/vaadin/data/util/sqlcontainer/UtilTest.java @@ -1,7 +1,6 @@ package com.vaadin.data.util.sqlcontainer; -import junit.framework.Assert; - +import org.junit.Assert; import org.junit.Test; public class UtilTest { diff --git a/server/tests/src/com/vaadin/data/util/sqlcontainer/connection/J2EEConnectionPoolTest.java b/server/tests/src/com/vaadin/data/util/sqlcontainer/connection/J2EEConnectionPoolTest.java index 65a995120e..1463a27217 100644 --- a/server/tests/src/com/vaadin/data/util/sqlcontainer/connection/J2EEConnectionPoolTest.java +++ b/server/tests/src/com/vaadin/data/util/sqlcontainer/connection/J2EEConnectionPoolTest.java @@ -7,9 +7,8 @@ import javax.naming.Context; import javax.naming.NamingException; import javax.sql.DataSource; -import junit.framework.Assert; - import org.easymock.EasyMock; +import org.junit.Assert; import org.junit.Test; public class J2EEConnectionPoolTest { diff --git a/server/tests/src/com/vaadin/data/util/sqlcontainer/connection/SimpleJDBCConnectionPoolTest.java b/server/tests/src/com/vaadin/data/util/sqlcontainer/connection/SimpleJDBCConnectionPoolTest.java index 541ab8da5b..99ad420229 100644 --- a/server/tests/src/com/vaadin/data/util/sqlcontainer/connection/SimpleJDBCConnectionPoolTest.java +++ b/server/tests/src/com/vaadin/data/util/sqlcontainer/connection/SimpleJDBCConnectionPoolTest.java @@ -3,9 +3,8 @@ package com.vaadin.data.util.sqlcontainer.connection; import java.sql.Connection; import java.sql.SQLException; -import junit.framework.Assert; - import org.easymock.EasyMock; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/server/tests/src/com/vaadin/data/util/sqlcontainer/filters/BetweenTest.java b/server/tests/src/com/vaadin/data/util/sqlcontainer/filters/BetweenTest.java index da4cfe4522..16171f67bc 100644 --- a/server/tests/src/com/vaadin/data/util/sqlcontainer/filters/BetweenTest.java +++ b/server/tests/src/com/vaadin/data/util/sqlcontainer/filters/BetweenTest.java @@ -1,8 +1,7 @@ package com.vaadin.data.util.sqlcontainer.filters; -import junit.framework.Assert; - import org.easymock.EasyMock; +import org.junit.Assert; import org.junit.Test; import com.vaadin.data.Item; diff --git a/server/tests/src/com/vaadin/data/util/sqlcontainer/query/QueryBuilderTest.java b/server/tests/src/com/vaadin/data/util/sqlcontainer/query/QueryBuilderTest.java index f635b23ebd..596f28cf5e 100644 --- a/server/tests/src/com/vaadin/data/util/sqlcontainer/query/QueryBuilderTest.java +++ b/server/tests/src/com/vaadin/data/util/sqlcontainer/query/QueryBuilderTest.java @@ -2,9 +2,8 @@ package com.vaadin.data.util.sqlcontainer.query; import java.util.ArrayList; -import junit.framework.Assert; - import org.easymock.EasyMock; +import org.junit.Assert; import org.junit.Test; import com.vaadin.data.Container.Filter; diff --git a/server/tests/src/com/vaadin/server/VaadinServletConfigurationTest.java b/server/tests/src/com/vaadin/server/VaadinServletConfigurationTest.java index a5c683a119..65698d2c44 100644 --- a/server/tests/src/com/vaadin/server/VaadinServletConfigurationTest.java +++ b/server/tests/src/com/vaadin/server/VaadinServletConfigurationTest.java @@ -24,9 +24,8 @@ import java.util.Properties; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; -import junit.framework.Assert; - import org.easymock.EasyMock; +import org.junit.Assert; import org.junit.Test; import com.vaadin.annotations.VaadinServletConfiguration; diff --git a/server/tests/src/com/vaadin/server/VaadinSessionTest.java b/server/tests/src/com/vaadin/server/VaadinSessionTest.java index d39da211f4..b710ee483f 100644 --- a/server/tests/src/com/vaadin/server/VaadinSessionTest.java +++ b/server/tests/src/com/vaadin/server/VaadinSessionTest.java @@ -23,9 +23,8 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSessionBindingEvent; -import junit.framework.Assert; - import org.easymock.EasyMock; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestStringToLongConverter.java b/server/tests/src/com/vaadin/tests/data/converter/TestStringToLongConverter.java index 3210703445..0e95975c17 100644 --- a/server/tests/src/com/vaadin/tests/data/converter/TestStringToLongConverter.java +++ b/server/tests/src/com/vaadin/tests/data/converter/TestStringToLongConverter.java @@ -2,9 +2,10 @@ package com.vaadin.tests.data.converter; import java.util.Locale; -import junit.framework.Assert; import junit.framework.TestCase; +import org.junit.Assert; + import com.vaadin.data.util.converter.Converter; import com.vaadin.data.util.converter.ReverseConverter; import com.vaadin.data.util.converter.StringToLongConverter; diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversions.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversions.java index 85116dd152..beb32e7dba 100644 --- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversions.java +++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversions.java @@ -2,9 +2,9 @@ package com.vaadin.tests.server.component.abstractfield; import java.util.Locale; -import junit.framework.Assert; import junit.framework.TestCase; +import org.junit.Assert; import org.junit.Test; import com.vaadin.data.util.MethodProperty; diff --git a/server/tests/src/com/vaadin/tests/server/component/gridlayout/DefaultAlignment.java b/server/tests/src/com/vaadin/tests/server/component/gridlayout/DefaultAlignment.java index 2faa65d1f2..244f1f9e45 100644 --- a/server/tests/src/com/vaadin/tests/server/component/gridlayout/DefaultAlignment.java +++ b/server/tests/src/com/vaadin/tests/server/component/gridlayout/DefaultAlignment.java @@ -1,7 +1,6 @@ package com.vaadin.tests.server.component.gridlayout; -import junit.framework.Assert; - +import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/server/tests/src/com/vaadin/tests/server/component/orderedlayout/DefaultAlignment.java b/server/tests/src/com/vaadin/tests/server/component/orderedlayout/DefaultAlignment.java index 701373aba0..9497a13c0a 100644 --- a/server/tests/src/com/vaadin/tests/server/component/orderedlayout/DefaultAlignment.java +++ b/server/tests/src/com/vaadin/tests/server/component/orderedlayout/DefaultAlignment.java @@ -1,7 +1,6 @@ package com.vaadin.tests.server.component.orderedlayout; -import junit.framework.Assert; - +import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/server/tests/src/com/vaadin/tests/server/component/slider/SliderTest.java b/server/tests/src/com/vaadin/tests/server/component/slider/SliderTest.java index d1dd87d923..f568da1392 100644 --- a/server/tests/src/com/vaadin/tests/server/component/slider/SliderTest.java +++ b/server/tests/src/com/vaadin/tests/server/component/slider/SliderTest.java @@ -1,8 +1,9 @@ package com.vaadin.tests.server.component.slider; -import junit.framework.Assert; import junit.framework.TestCase; +import org.junit.Assert; + import com.vaadin.ui.Slider; import com.vaadin.ui.Slider.ValueOutOfBoundsException; @@ -11,9 +12,9 @@ public class SliderTest extends TestCase { public void testOutOfBounds() { Slider s = new Slider(0, 10); s.setValue(0.0); - Assert.assertEquals(0.0, s.getValue()); + Assert.assertEquals(0.0, s.getValue().doubleValue(), 0.001); s.setValue(10.0); - Assert.assertEquals(10.0, s.getValue()); + Assert.assertEquals(10.0, s.getValue().doubleValue(), 0.001); try { s.setValue(20.0); fail("Should throw out of bounds exception"); diff --git a/server/tests/src/com/vaadin/tests/server/component/table/CacheUpdateExceptionCauses.java b/server/tests/src/com/vaadin/tests/server/component/table/CacheUpdateExceptionCauses.java index 7a7b488bc0..beb5da0885 100644 --- a/server/tests/src/com/vaadin/tests/server/component/table/CacheUpdateExceptionCauses.java +++ b/server/tests/src/com/vaadin/tests/server/component/table/CacheUpdateExceptionCauses.java @@ -16,8 +16,7 @@ package com.vaadin.tests.server.component.table; -import junit.framework.Assert; - +import org.junit.Assert; import org.junit.Test; import com.vaadin.ui.Table; diff --git a/server/tests/src/com/vaadin/tests/server/components/TestTextFieldValueChange.java b/server/tests/src/com/vaadin/tests/server/components/TestTextFieldValueChange.java index de838e339c..7c47b94df4 100644 --- a/server/tests/src/com/vaadin/tests/server/components/TestTextFieldValueChange.java +++ b/server/tests/src/com/vaadin/tests/server/components/TestTextFieldValueChange.java @@ -3,9 +3,8 @@ package com.vaadin.tests.server.components; import java.util.HashMap; import java.util.Map; -import junit.framework.Assert; - import org.easymock.EasyMock; +import org.junit.Assert; import com.vaadin.data.Property.ValueChangeEvent; import com.vaadin.data.util.ObjectProperty; diff --git a/server/tests/src/com/vaadin/tests/util/TestUtil.java b/server/tests/src/com/vaadin/tests/util/TestUtil.java index e84f9dd8b9..88ed017f91 100644 --- a/server/tests/src/com/vaadin/tests/util/TestUtil.java +++ b/server/tests/src/com/vaadin/tests/util/TestUtil.java @@ -2,7 +2,7 @@ package com.vaadin.tests.util; import java.util.Iterator; -import junit.framework.Assert; +import org.junit.Assert; public class TestUtil { public static void assertArrays(Object[] actualObjects, diff --git a/server/tests/src/com/vaadin/ui/AbsFieldDataSourceLocaleChange.java b/server/tests/src/com/vaadin/ui/AbsFieldDataSourceLocaleChange.java index ff615e3d91..fa69fc46da 100644 --- a/server/tests/src/com/vaadin/ui/AbsFieldDataSourceLocaleChange.java +++ b/server/tests/src/com/vaadin/ui/AbsFieldDataSourceLocaleChange.java @@ -3,8 +3,7 @@ package com.vaadin.ui; import java.text.NumberFormat; import java.util.Locale; -import junit.framework.Assert; - +import org.junit.Assert; import org.junit.Before; import org.junit.Test; |