diff options
author | Matthias Villiger | 2017-04-11 10:35:59 +0000 |
---|---|---|
committer | Matthias Villiger | 2017-04-18 10:48:43 +0000 |
commit | ddf06be4f4a18d01538e42213bca0e3c779732c0 (patch) | |
tree | fc9afbf36c7901e8771559daf51d84e11db8b488 /org.eclipse.scout.rt.mom.api.test | |
parent | 9d30a6e2fa5e74e067f9e014b4b8d49530076258 (diff) | |
download | org.eclipse.scout.rt-ddf06be4f4a18d01538e42213bca0e3c779732c0.tar.gz org.eclipse.scout.rt-ddf06be4f4a18d01538e42213bca0e3c779732c0.tar.xz org.eclipse.scout.rt-ddf06be4f4a18d01538e42213bca0e3c779732c0.zip |
Throw exception if beans with same order replace the same super class.
Change-Id: I50e769598150e213664a8f8380615f50e9f0eebb
Reviewed-on: https://git.eclipse.org/r/94812
Tested-by: Hudson CI
Reviewed-by: Matthias Villiger <mvi@bsi-software.com>
Diffstat (limited to 'org.eclipse.scout.rt.mom.api.test')
2 files changed, 2 insertions, 24 deletions
diff --git a/org.eclipse.scout.rt.mom.api.test/src/test/java/org/eclipse/scout/rt/mom/api/marshaller/BeanManagerUtilityTest.java b/org.eclipse.scout.rt.mom.api.test/src/test/java/org/eclipse/scout/rt/mom/api/marshaller/BeanManagerUtilityTest.java index 8ccf38ea8f..9d4d8a5255 100644 --- a/org.eclipse.scout.rt.mom.api.test/src/test/java/org/eclipse/scout/rt/mom/api/marshaller/BeanManagerUtilityTest.java +++ b/org.eclipse.scout.rt.mom.api.test/src/test/java/org/eclipse/scout/rt/mom/api/marshaller/BeanManagerUtilityTest.java @@ -70,26 +70,6 @@ public class BeanManagerUtilityTest { } @Test - public void testLookupClass_noScoutBean() { - assertNull(s_utility.lookupClass(String.class)); - } - - @Test - public void testLookupClass_oneScoutBean() { - assertEquals(SubClassA.class, s_utility.lookupClass(SubClassA.class)); - } - - @Test - public void testLookupClass_uniqueScoutBean() { - assertEquals(SubClassB1.class, s_utility.lookupClass(SubClassB.class)); - } - - @Test - public void testLookupClass_multipleScoutBeans() { - assertNull(s_utility.lookupClass(AbstractBaseClass.class)); - } - - @Test public void testLookupRegisteredBean() { assertEquals(SubClassA.class, s_utility.lookupRegisteredBean(SubClassA.class).getBeanClazz()); assertEquals(SubClassB.class, s_utility.lookupRegisteredBean(SubClassB.class).getBeanClazz()); diff --git a/org.eclipse.scout.rt.mom.api.test/src/test/java/org/eclipse/scout/rt/mom/api/marshaller/JandexTypeNameIdResolverTest.java b/org.eclipse.scout.rt.mom.api.test/src/test/java/org/eclipse/scout/rt/mom/api/marshaller/JandexTypeNameIdResolverTest.java index fce47a35b4..705cc0040f 100644 --- a/org.eclipse.scout.rt.mom.api.test/src/test/java/org/eclipse/scout/rt/mom/api/marshaller/JandexTypeNameIdResolverTest.java +++ b/org.eclipse.scout.rt.mom.api.test/src/test/java/org/eclipse/scout/rt/mom/api/marshaller/JandexTypeNameIdResolverTest.java @@ -328,15 +328,13 @@ public class JandexTypeNameIdResolverTest { } } - @Test + @Test(expected = IllegalArgumentException.class) public void testMarshallUnmarshallProjectBeanNotUnique() { IBean registeredProjectBean1 = TestingUtility.registerBean(new BeanMetaData(ProjectBean1.class).withReplace(true)); IBean registeredProjectBean2 = TestingUtility.registerBean(new BeanMetaData(ProjectBean2.class).withReplace(true)); try { CoreBean bean = new CoreBean(); - CoreBean beanMarshalled = marshallUnmarshall(bean); - // TODO [7.0] pbz: this is wrong, bean is not unique, should throw exception! Check with mvi after solving bean manager bug; then adapt this assertion - assertEquals(ProjectBean1.class, beanMarshalled.getClass()); + marshallUnmarshall(bean); } finally { TestingUtility.unregisterBean(registeredProjectBean1); |