diff options
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/.classpath (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/.classpath) | 16 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/.project (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/.project) | 56 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/.settings/org.eclipse.jdt.core.prefs (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/.settings/org.eclipse.jdt.core.prefs) | 0 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/.settings/org.eclipse.jdt.ui.prefs (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/.settings/org.eclipse.jdt.ui.prefs) | 0 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/META-INF/MANIFEST.MF (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/META-INF/MANIFEST.MF) | 28 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/about.html (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/about.html) | 56 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/build.properties (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/build.properties) | 18 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/plugin.properties (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/plugin.properties) | 24 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/resources/plugin.xml (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/resources/plugin.xml) | 544 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/AbstractMethodInjectionTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/AbstractMethodInjectionTest.java) | 78 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/AbstractServiceDescTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/AbstractServiceDescTest.java) | 120 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/AliasDescTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/AliasDescTest.java) | 152 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ConstructorInjectionTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ConstructorInjectionTest.java) | 152 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/DescriptorsTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/DescriptorsTest.java) | 262 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/FeatureInjectionTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/FeatureInjectionTest.java) | 120 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/InjectedServiceTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/InjectedServiceTest.java) | 152 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/InjectedValueTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/InjectedValueTest.java) | 120 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/MethodInjectionTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/MethodInjectionTest.java) | 152 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/OpaqueInjectedValueTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/OpaqueInjectedValueTest.java) | 152 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ParameterInjectionTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ParameterInjectionTest.java) | 192 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/PropertyInjectionTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/PropertyInjectionTest.java) | 152 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/RegistryDescTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/RegistryDescTest.java) | 322 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServiceDescTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServiceDescTest.java) | 152 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServiceFactoryDescTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServiceFactoryDescTest.java) | 152 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServiceSetDescTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServiceSetDescTest.java) | 262 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServicedescriptorsAllTests.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServicedescriptorsAllTests.java) | 100 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServicedescriptorsExample.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServicedescriptorsExample.java) | 238 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServicedescriptorsTests.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServicedescriptorsTests.java) | 104 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AbstractMethodInjectionTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AbstractMethodInjectionTest.java) | 78 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AbstractServiceDescTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AbstractServiceDescTest.java) | 120 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AbstractServiceIdDescTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AbstractServiceIdDescTest.java) | 120 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AliasDescTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AliasDescTest.java) | 152 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AliasIdDescTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AliasIdDescTest.java) | 152 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ConstructorInjectionTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ConstructorInjectionTest.java) | 152 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/DescriptorsTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/DescriptorsTest.java) | 192 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/FeatureInjectionTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/FeatureInjectionTest.java) | 120 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/IdDescriptorsTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/IdDescriptorsTest.java) | 192 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/InjectedServiceTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/InjectedServiceTest.java) | 152 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/InjectedValueTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/InjectedValueTest.java) | 120 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/MethodInjectionTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/MethodInjectionTest.java) | 152 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/OpaqueInjectedValueTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/OpaqueInjectedValueTest.java) | 152 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ParameterInjectionTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ParameterInjectionTest.java) | 192 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/PropertyInjectionTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/PropertyInjectionTest.java) | 152 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/RegistryDescTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/RegistryDescTest.java) | 192 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/RegistryIdDescTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/RegistryIdDescTest.java) | 192 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceDescTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceDescTest.java) | 152 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceFactoryDescTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceFactoryDescTest.java) | 152 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceFactoryIdDescTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceFactoryIdDescTest.java) | 152 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceIdDescTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceIdDescTest.java) | 152 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceSetIdDescTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceSetIdDescTest.java) | 324 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceSetTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceSetTest.java) | 324 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServicedescriptorswithidAllTests.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServicedescriptorswithidAllTests.java) | 100 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServicedescriptorswithidExample.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServicedescriptorswithidExample.java) | 238 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServicedescriptorswithidTests.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServicedescriptorswithidTests.java) | 100 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/AbstractServiceDescriptorsWithIdProviderTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/AbstractServiceDescriptorsWithIdProviderTest.java) | 408 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/AllTests.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/AllTests.java) | 62 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/AnnotatedClass.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/AnnotatedClass.java) | 58 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/EclipseExtensionUtils.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/EclipseExtensionUtils.java) | 258 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ExtensionServiceDescriptorsWithIdProviderFromFile.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ExtensionServiceDescriptorsWithIdProviderFromFile.java) | 96 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ExtensionServiceDescriptorsWithIdProviderIntegrationTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ExtensionServiceDescriptorsWithIdProviderIntegrationTest.java) | 622 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ExtensionServiceDescriptorsWithIdProviderTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ExtensionServiceDescriptorsWithIdProviderTest.java) | 370 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeService.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeService.java) | 158 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceA.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceA.java) | 56 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceB.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceB.java) | 56 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceC.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceC.java) | 56 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceDescriptor.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceDescriptor.java) | 86 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceFactory.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceFactory.java) | 140 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeWithRequiredServiceFactory.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeWithRequiredServiceFactory.java) | 108 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceA.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceA.java) | 104 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceA10.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceA10.java) | 12 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceB.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceB.java) | 12 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceC.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceC.java) | 12 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceDescriptorsWithIdProviderCollectionTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceDescriptorsWithIdProviderCollectionTest.java) | 230 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServicePojoA.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServicePojoA.java) | 12 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceRegistryFactoryTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceRegistryFactoryTest.java) | 178 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceTest.java) | 104 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServicesRegistryTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServicesRegistryTest.java) | 1818 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServicesRegistryWithParentTest.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServicesRegistryWithParentTest.java) | 730 | ||||
-rw-r--r-- | plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/TestTrace.java (renamed from plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/TestTrace.java) | 386 | ||||
-rw-r--r-- | releng/org.eclipse.papyrus.oomph/setups/papyrus.setup | 24 | ||||
-rw-r--r-- | tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/.settings/org.eclipse.jdt.core.prefs | 285 | ||||
-rw-r--r-- | tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/.settings/org.eclipse.jdt.ui.prefs | 68 | ||||
-rw-r--r-- | tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/.settings/org.eclipse.jdt.core.prefs | 285 | ||||
-rw-r--r-- | tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/.settings/org.eclipse.jdt.ui.prefs | 68 |
84 files changed, 7858 insertions, 7156 deletions
diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/.classpath b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/.classpath index a2115fe74e0..181dba68548 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/.classpath +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/.classpath @@ -1,8 +1,8 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="tests"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="src" path="tests"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/.project b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/.project index a03a4305f66..6c9258c05f7 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/.project +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/.project @@ -1,28 +1,28 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.infra.core.serviceregistry.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.papyrus.infra.core.serviceregistry.tests</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/.settings/org.eclipse.jdt.core.prefs index 4d72ad12656..4d72ad12656 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/.settings/org.eclipse.jdt.core.prefs diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/.settings/org.eclipse.jdt.ui.prefs b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/.settings/org.eclipse.jdt.ui.prefs index 954281dbc31..954281dbc31 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/.settings/org.eclipse.jdt.ui.prefs +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/.settings/org.eclipse.jdt.ui.prefs diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/META-INF/MANIFEST.MF b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/META-INF/MANIFEST.MF index 74d3d332bf6..248d45fc57d 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/META-INF/MANIFEST.MF +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/META-INF/MANIFEST.MF @@ -1,14 +1,14 @@ -Manifest-Version: 1.0
-Require-Bundle: org.eclipse.emf.ecore.xmi,
- org.junit;bundle-version="4.10.0"
-Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.papyrus.infra.core.serviceregistry;bundle-v
- ersion="0.10.0"
-Bundle-Version: 1.0.1.qualifier
-Bundle-Localization: plugin
-Bundle-Name: %pluginName
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.infra.core.serviceregistry.te
- sts;singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
+Manifest-Version: 1.0 +Require-Bundle: org.eclipse.emf.ecore.xmi, + org.junit;bundle-version="4.10.0" +Bundle-Vendor: %providerName +Fragment-Host: org.eclipse.papyrus.infra.core.serviceregistry;bundle-v + ersion="0.10.0" +Bundle-Version: 1.0.1.qualifier +Bundle-Localization: plugin +Bundle-Name: %pluginName +Bundle-ManifestVersion: 2 +Bundle-SymbolicName: org.eclipse.papyrus.infra.core.serviceregistry.te + sts;singleton:=true +Bundle-RequiredExecutionEnvironment: J2SE-1.5 + diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/about.html b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/about.html index 82d49bf5f81..d35d5aed64c 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/about.html +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/about.html @@ -1,28 +1,28 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<title>About</title> +</head> +<body lang="EN-US"> +<h2>About This Content</h2> + +<p>June 5, 2007</p> +<h3>License</h3> + +<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. +For purposes of the EPL, "Program" will mean the Content.</p> + +<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p> + +</body> +</html> diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/build.properties b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/build.properties index 4f623cf2f57..61a43b3c902 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/build.properties +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/build.properties @@ -1,9 +1,9 @@ -source.. = src/,\
- tests/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- resources/,\
- about.html,\
- plugin.properties
-src.includes = about.html
+source.. = src/,\ + tests/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + resources/,\ + about.html,\ + plugin.properties +src.includes = about.html diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/plugin.properties b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/plugin.properties index 376bf25e8b5..a796887501a 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/plugin.properties +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/plugin.properties @@ -1,12 +1,12 @@ -#################################################################################
-# Copyright (c) 2012 Cedric Dumoulin.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
-##################################################################################
-pluginName=Papyrus Service Registry
-providerName=Eclipse Modeling Project
+################################################################################# +# Copyright (c) 2012 Cedric Dumoulin. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation +################################################################################## +pluginName=Papyrus Service Registry +providerName=Eclipse Modeling Project diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/resources/plugin.xml b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/resources/plugin.xml index 27ce24a6ce3..d3b8aed06f1 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/resources/plugin.xml +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/resources/plugin.xml @@ -1,272 +1,272 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
->
- <extension
- point="org.eclipse.papyrus.infra.core.serviceregistry.service">
- <servicesSet
- id="simpleTest">
- <service
- classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceA"
- priority="1"
- startKind="startup">
- </service>
- <service
- classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceC"
- priority="1"
- startKind="lazy">
- <dependsOn
- serviceId="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceA">
- </dependsOn>
- </service>
- <extendedServiceSet
- serviceSetId="papyrusWizard">
- </extendedServiceSet>
- </servicesSet>
- <registry
- id="simpleTestRegistry"
- isUnique="false">
- <serviceSets
- serviceSetId="simpleTest">
- </serviceSets>
- </registry>
- <servicesSet
- id="papyrusWizard">
- <service
- classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceB"
- priority="1"
- startKind="startup">
- </service>
- </servicesSet>
- <registry
- id="papyrusWizardRegistry"
- isUnique="false">
- <serviceSets
- serviceSetId="papyrusWizard">
- </serviceSets>
- </registry>
- <servicesSet
- id="setWithC">
- <service
- classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceC"
- priority="1"
- startKind="startup">
- </service>
- </servicesSet>
- <servicesSet
- id="extendingSet">
- <service
- classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceA"
- priority="1"
- startKind="startup">
- </service>
- <service
- classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceB"
- priority="1"
- startKind="startup">
- </service>
- <extendedServiceSet
- serviceSetId="setWithC">
- </extendedServiceSet>
- </servicesSet>
- <registry
- id="extendingSetRegistry"
- isUnique="false">
- <serviceSets
- serviceSetId="extendingSet">
- </serviceSets>
- </registry>
- <servicesSet
- id="badSetExtendsIdMissing">
- <service
- classname="badService"
- priority="1"
- startKind="lazy">
- </service>
- <extendedServiceSet>
- </extendedServiceSet>
- </servicesSet>
- <registry
- id="badSetExtendsIdMissingRegistry"
- isUnique="false">
- <serviceSets
- serviceSetId="badSetExtendsIdMissing">
- </serviceSets>
- </registry>
- <servicesSet
- id="dependantServices">
- <service
- classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceA"
- priority="1"
- startKind="startup">
- <dependsOn
- serviceId="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceB">
- </dependsOn>
- </service>
- <service
- classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceB"
- priority="1"
- startKind="lazy">
- <dependsOn
- serviceId="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceC">
- </dependsOn>
- </service>
- <service
- classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceC"
- priority="1"
- startKind="startup">
- </service>
- </servicesSet>
- <registry
- id="dependantServicesRegistry"
- isUnique="false">
- <serviceSets
- serviceSetId="dependantServices">
- </serviceSets>
- </registry>
- <servicesSet
- id="setWithAlias">
- <service
- classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceA"
- priority="1"
- startKind="startup">
- </service>
- <alias
- aliasedServiceId="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceA"
- id="AnAlias"
- priority="1">
- </alias>
- </servicesSet>
- <registry
- id="setWithAliasRegistry"
- isUnique="false">
- <serviceSets
- serviceSetId="setWithAlias">
- </serviceSets>
- </registry>
- </extension>
- <extension
- point="org.eclipse.papyrus.infra.core.serviceregistry.service">
- <servicesSet
- id="doubleName">
- <service
- classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceA"
- priority="1"
- startKind="startup">
- </service>
- </servicesSet>
- <servicesSet
- id="doubleName">
- <service
- classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceB"
- priority="1"
- startKind="startup">
- </service>
- </servicesSet>
- <registry
- id="doubleNameRegistry"
- isUnique="false">
- <serviceSets
- serviceSetId="doubleName">
- </serviceSets>
- <serviceSets
- serviceSetId="doubleName">
- </serviceSets>
- </registry>
- </extension>
- <extension
- point="org.eclipse.papyrus.infra.core.serviceregistry.service">
- <servicesSet
- id="servicesSetA">
- </servicesSet>
- <servicesSet
- id="servicesSetB">
- </servicesSet>
- <servicesSet
- id="servicesSetC">
- </servicesSet>
- <registry
- id="registryA"
- isUnique="false">
- <serviceSets
- serviceSetId="servicesSetA">
- </serviceSets>
- <extendedRegistry
- registryId="registryB">
- </extendedRegistry>
- <parentRegistry
- registryId="registryC">
- </parentRegistry>
- </registry>
- <registry
- id="registryB"
- isUnique="false">
- </registry>
- <registry
- id="registryC"
- isUnique="false">
- </registry>
- </extension>
- <extension
- point="org.eclipse.papyrus.infra.core.serviceregistry.service">
- <servicesSet
- id="fragmentA">
- <service
- classname="serviceA"
- id="serviceA1"
- priority="1"
- startKind="lazy">
- </service>
- <service
- id="serviceA2"
- priority="1"
- startKind="lazy">
- </service>
- <extendedServiceSet
- serviceSetId="fragmentB">
- </extendedServiceSet>
- </servicesSet>
- <servicesSet
- id="fragmentB">
- </servicesSet>
- <servicesSet
- id="fragmentC">
- <service
- classname="org.eclipse.papyrus.infra.core.serviceregistry.tests.Service3"
- id="serviceC1"
- priority="1"
- startKind="lazy">
- </service>
- </servicesSet>
- <servicesSet
- id="multiFragmentA">
- <service
- classname="org.eclipse.papyrus.infra.core.serviceregistry.tests.Service4"
- id="serviceM2"
- priority="1"
- startKind="lazy">
- </service>
- </servicesSet>
- <servicesSet
- id="multiFragmentA">
- <service
- classname="org.eclipse.papyrus.infra.core.serviceregistry.tests.Service4"
- id="serviceM1"
- priority="1"
- startKind="lazy">
- </service>
- </servicesSet>
- <servicesSet
- id="multiFragmentA">
- <service
- classname="org.eclipse.papyrus.infra.core.serviceregistry.tests.Service4"
- id="serviceM3"
- priority="1"
- startKind="lazy">
- </service>
- <extendedServiceSet
- serviceSetId="fragmentB">
- </extendedServiceSet>
- </servicesSet>
- </extension>
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> +<plugin +> + <extension + point="org.eclipse.papyrus.infra.core.serviceregistry.service"> + <servicesSet + id="simpleTest"> + <service + classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceA" + priority="1" + startKind="startup"> + </service> + <service + classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceC" + priority="1" + startKind="lazy"> + <dependsOn + serviceId="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceA"> + </dependsOn> + </service> + <extendedServiceSet + serviceSetId="papyrusWizard"> + </extendedServiceSet> + </servicesSet> + <registry + id="simpleTestRegistry" + isUnique="false"> + <serviceSets + serviceSetId="simpleTest"> + </serviceSets> + </registry> + <servicesSet + id="papyrusWizard"> + <service + classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceB" + priority="1" + startKind="startup"> + </service> + </servicesSet> + <registry + id="papyrusWizardRegistry" + isUnique="false"> + <serviceSets + serviceSetId="papyrusWizard"> + </serviceSets> + </registry> + <servicesSet + id="setWithC"> + <service + classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceC" + priority="1" + startKind="startup"> + </service> + </servicesSet> + <servicesSet + id="extendingSet"> + <service + classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceA" + priority="1" + startKind="startup"> + </service> + <service + classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceB" + priority="1" + startKind="startup"> + </service> + <extendedServiceSet + serviceSetId="setWithC"> + </extendedServiceSet> + </servicesSet> + <registry + id="extendingSetRegistry" + isUnique="false"> + <serviceSets + serviceSetId="extendingSet"> + </serviceSets> + </registry> + <servicesSet + id="badSetExtendsIdMissing"> + <service + classname="badService" + priority="1" + startKind="lazy"> + </service> + <extendedServiceSet> + </extendedServiceSet> + </servicesSet> + <registry + id="badSetExtendsIdMissingRegistry" + isUnique="false"> + <serviceSets + serviceSetId="badSetExtendsIdMissing"> + </serviceSets> + </registry> + <servicesSet + id="dependantServices"> + <service + classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceA" + priority="1" + startKind="startup"> + <dependsOn + serviceId="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceB"> + </dependsOn> + </service> + <service + classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceB" + priority="1" + startKind="lazy"> + <dependsOn + serviceId="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceC"> + </dependsOn> + </service> + <service + classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceC" + priority="1" + startKind="startup"> + </service> + </servicesSet> + <registry + id="dependantServicesRegistry" + isUnique="false"> + <serviceSets + serviceSetId="dependantServices"> + </serviceSets> + </registry> + <servicesSet + id="setWithAlias"> + <service + classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceA" + priority="1" + startKind="startup"> + </service> + <alias + aliasedServiceId="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceA" + id="AnAlias" + priority="1"> + </alias> + </servicesSet> + <registry + id="setWithAliasRegistry" + isUnique="false"> + <serviceSets + serviceSetId="setWithAlias"> + </serviceSets> + </registry> + </extension> + <extension + point="org.eclipse.papyrus.infra.core.serviceregistry.service"> + <servicesSet + id="doubleName"> + <service + classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceA" + priority="1" + startKind="startup"> + </service> + </servicesSet> + <servicesSet + id="doubleName"> + <service + classname="org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceB" + priority="1" + startKind="startup"> + </service> + </servicesSet> + <registry + id="doubleNameRegistry" + isUnique="false"> + <serviceSets + serviceSetId="doubleName"> + </serviceSets> + <serviceSets + serviceSetId="doubleName"> + </serviceSets> + </registry> + </extension> + <extension + point="org.eclipse.papyrus.infra.core.serviceregistry.service"> + <servicesSet + id="servicesSetA"> + </servicesSet> + <servicesSet + id="servicesSetB"> + </servicesSet> + <servicesSet + id="servicesSetC"> + </servicesSet> + <registry + id="registryA" + isUnique="false"> + <serviceSets + serviceSetId="servicesSetA"> + </serviceSets> + <extendedRegistry + registryId="registryB"> + </extendedRegistry> + <parentRegistry + registryId="registryC"> + </parentRegistry> + </registry> + <registry + id="registryB" + isUnique="false"> + </registry> + <registry + id="registryC" + isUnique="false"> + </registry> + </extension> + <extension + point="org.eclipse.papyrus.infra.core.serviceregistry.service"> + <servicesSet + id="fragmentA"> + <service + classname="serviceA" + id="serviceA1" + priority="1" + startKind="lazy"> + </service> + <service + id="serviceA2" + priority="1" + startKind="lazy"> + </service> + <extendedServiceSet + serviceSetId="fragmentB"> + </extendedServiceSet> + </servicesSet> + <servicesSet + id="fragmentB"> + </servicesSet> + <servicesSet + id="fragmentC"> + <service + classname="org.eclipse.papyrus.infra.core.serviceregistry.tests.Service3" + id="serviceC1" + priority="1" + startKind="lazy"> + </service> + </servicesSet> + <servicesSet + id="multiFragmentA"> + <service + classname="org.eclipse.papyrus.infra.core.serviceregistry.tests.Service4" + id="serviceM2" + priority="1" + startKind="lazy"> + </service> + </servicesSet> + <servicesSet + id="multiFragmentA"> + <service + classname="org.eclipse.papyrus.infra.core.serviceregistry.tests.Service4" + id="serviceM1" + priority="1" + startKind="lazy"> + </service> + </servicesSet> + <servicesSet + id="multiFragmentA"> + <service + classname="org.eclipse.papyrus.infra.core.serviceregistry.tests.Service4" + id="serviceM3" + priority="1" + startKind="lazy"> + </service> + <extendedServiceSet + serviceSetId="fragmentB"> + </extendedServiceSet> + </servicesSet> + </extension> +</plugin> diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/AbstractMethodInjectionTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/AbstractMethodInjectionTest.java index 13c12f96b0b..64cde0d9c21 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/AbstractMethodInjectionTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/AbstractMethodInjectionTest.java @@ -1,39 +1,39 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.AbstractMethodInjection;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Abstract Method Injection</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public abstract class AbstractMethodInjectionTest extends FeatureInjectionTest {
-
- /**
- * Constructs a new Abstract Method Injection test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public AbstractMethodInjectionTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Abstract Method Injection test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected AbstractMethodInjection getFixture() {
- return (AbstractMethodInjection) fixture;
- }
-
-} // AbstractMethodInjectionTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.AbstractMethodInjection; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Abstract Method Injection</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public abstract class AbstractMethodInjectionTest extends FeatureInjectionTest { + + /** + * Constructs a new Abstract Method Injection test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public AbstractMethodInjectionTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Abstract Method Injection test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected AbstractMethodInjection getFixture() { + return (AbstractMethodInjection) fixture; + } + +} // AbstractMethodInjectionTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/AbstractServiceDescTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/AbstractServiceDescTest.java index 2bcbb93b9f3..c5a1ee97a0d 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/AbstractServiceDescTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/AbstractServiceDescTest.java @@ -1,60 +1,60 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.AbstractServiceDesc;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Abstract Service Desc</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public abstract class AbstractServiceDescTest extends TestCase {
-
- /**
- * The fixture for this Abstract Service Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected AbstractServiceDesc fixture = null;
-
- /**
- * Constructs a new Abstract Service Desc test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public AbstractServiceDescTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Abstract Service Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void setFixture(AbstractServiceDesc fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Abstract Service Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected AbstractServiceDesc getFixture() {
- return fixture;
- }
-
-} // AbstractServiceDescTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests; + +import junit.framework.TestCase; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.AbstractServiceDesc; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Abstract Service Desc</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public abstract class AbstractServiceDescTest extends TestCase { + + /** + * The fixture for this Abstract Service Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected AbstractServiceDesc fixture = null; + + /** + * Constructs a new Abstract Service Desc test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public AbstractServiceDescTest(String name) { + super(name); + } + + /** + * Sets the fixture for this Abstract Service Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void setFixture(AbstractServiceDesc fixture) { + this.fixture = fixture; + } + + /** + * Returns the fixture for this Abstract Service Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected AbstractServiceDesc getFixture() { + return fixture; + } + +} // AbstractServiceDescTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/AliasDescTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/AliasDescTest.java index c8ac455704c..f7b43c9cc52 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/AliasDescTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/AliasDescTest.java @@ -1,76 +1,76 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.AliasDesc;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Alias Desc</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class AliasDescTest extends AbstractServiceDescTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(AliasDescTest.class);
- }
-
- /**
- * Constructs a new Alias Desc test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public AliasDescTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Alias Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected AliasDesc getFixture() {
- return (AliasDesc) fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorsFactory.eINSTANCE.createAliasDesc());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // AliasDescTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests; + +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.AliasDesc; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Alias Desc</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class AliasDescTest extends AbstractServiceDescTest { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(AliasDescTest.class); + } + + /** + * Constructs a new Alias Desc test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public AliasDescTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Alias Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected AliasDesc getFixture() { + return (AliasDesc) fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorsFactory.eINSTANCE.createAliasDesc()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // AliasDescTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ConstructorInjectionTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ConstructorInjectionTest.java index 1e06f92c99b..7f13d3b2c62 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ConstructorInjectionTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ConstructorInjectionTest.java @@ -1,76 +1,76 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ConstructorInjection;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Constructor Injection</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class ConstructorInjectionTest extends AbstractMethodInjectionTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(ConstructorInjectionTest.class);
- }
-
- /**
- * Constructs a new Constructor Injection test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public ConstructorInjectionTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Constructor Injection test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected ConstructorInjection getFixture() {
- return (ConstructorInjection) fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorsFactory.eINSTANCE.createConstructorInjection());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // ConstructorInjectionTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests; + +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ConstructorInjection; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Constructor Injection</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class ConstructorInjectionTest extends AbstractMethodInjectionTest { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(ConstructorInjectionTest.class); + } + + /** + * Constructs a new Constructor Injection test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public ConstructorInjectionTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Constructor Injection test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected ConstructorInjection getFixture() { + return (ConstructorInjection) fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorsFactory.eINSTANCE.createConstructorInjection()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // ConstructorInjectionTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/DescriptorsTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/DescriptorsTest.java index 04484319329..5fbdeceb7d6 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/DescriptorsTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/DescriptorsTest.java @@ -1,131 +1,131 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests;
-
-import junit.framework.TestCase;
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.Descriptors;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Descriptors</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following operations are tested:
- * <ul>
- * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.Descriptors#getRegistryDesc(java.lang.String) <em>Get Registry Desc</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.Descriptors#getServiceSetDesc(java.lang.String) <em>Get Service Set Desc</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class DescriptorsTest extends TestCase {
-
- /**
- * The fixture for this Descriptors test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected Descriptors fixture = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(DescriptorsTest.class);
- }
-
- /**
- * Constructs a new Descriptors test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public DescriptorsTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Descriptors test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void setFixture(Descriptors fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Descriptors test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected Descriptors getFixture() {
- return fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorsFactory.eINSTANCE.createDescriptors());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
- /**
- * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.Descriptors#getRegistryDesc(java.lang.String) <em>Get Registry Desc</em>}' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.Descriptors#getRegistryDesc(java.lang.String)
- * @generated
- */
- public void testGetRegistryDesc__String() {
- // TODO: implement this operation test method
- // Ensure that you remove @generated or mark it @generated NOT
- fail();
- }
-
- /**
- * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.Descriptors#getServiceSetDesc(java.lang.String) <em>Get Service Set Desc</em>}' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.Descriptors#getServiceSetDesc(java.lang.String)
- * @generated
- */
- public void testGetServiceSetDesc__String() {
- // TODO: implement this operation test method
- // Ensure that you remove @generated or mark it @generated NOT
- fail();
- }
-
-} // DescriptorsTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests; + +import junit.framework.TestCase; +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.Descriptors; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Descriptors</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following operations are tested: + * <ul> + * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.Descriptors#getRegistryDesc(java.lang.String) <em>Get Registry Desc</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.Descriptors#getServiceSetDesc(java.lang.String) <em>Get Service Set Desc</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class DescriptorsTest extends TestCase { + + /** + * The fixture for this Descriptors test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected Descriptors fixture = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(DescriptorsTest.class); + } + + /** + * Constructs a new Descriptors test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public DescriptorsTest(String name) { + super(name); + } + + /** + * Sets the fixture for this Descriptors test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void setFixture(Descriptors fixture) { + this.fixture = fixture; + } + + /** + * Returns the fixture for this Descriptors test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected Descriptors getFixture() { + return fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorsFactory.eINSTANCE.createDescriptors()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + + /** + * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.Descriptors#getRegistryDesc(java.lang.String) <em>Get Registry Desc</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.Descriptors#getRegistryDesc(java.lang.String) + * @generated + */ + public void testGetRegistryDesc__String() { + // TODO: implement this operation test method + // Ensure that you remove @generated or mark it @generated NOT + fail(); + } + + /** + * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.Descriptors#getServiceSetDesc(java.lang.String) <em>Get Service Set Desc</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.Descriptors#getServiceSetDesc(java.lang.String) + * @generated + */ + public void testGetServiceSetDesc__String() { + // TODO: implement this operation test method + // Ensure that you remove @generated or mark it @generated NOT + fail(); + } + +} // DescriptorsTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/FeatureInjectionTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/FeatureInjectionTest.java index d1e51ac2750..b6ee66c67ae 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/FeatureInjectionTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/FeatureInjectionTest.java @@ -1,60 +1,60 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.FeatureInjection;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Feature Injection</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public abstract class FeatureInjectionTest extends TestCase {
-
- /**
- * The fixture for this Feature Injection test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected FeatureInjection fixture = null;
-
- /**
- * Constructs a new Feature Injection test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public FeatureInjectionTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Feature Injection test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void setFixture(FeatureInjection fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Feature Injection test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected FeatureInjection getFixture() {
- return fixture;
- }
-
-} // FeatureInjectionTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests; + +import junit.framework.TestCase; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.FeatureInjection; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Feature Injection</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public abstract class FeatureInjectionTest extends TestCase { + + /** + * The fixture for this Feature Injection test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected FeatureInjection fixture = null; + + /** + * Constructs a new Feature Injection test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public FeatureInjectionTest(String name) { + super(name); + } + + /** + * Sets the fixture for this Feature Injection test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void setFixture(FeatureInjection fixture) { + this.fixture = fixture; + } + + /** + * Returns the fixture for this Feature Injection test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected FeatureInjection getFixture() { + return fixture; + } + +} // FeatureInjectionTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/InjectedServiceTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/InjectedServiceTest.java index 291005dc57d..277474d7c69 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/InjectedServiceTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/InjectedServiceTest.java @@ -1,76 +1,76 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.InjectedService;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Injected Service</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class InjectedServiceTest extends InjectedValueTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(InjectedServiceTest.class);
- }
-
- /**
- * Constructs a new Injected Service test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public InjectedServiceTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Injected Service test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected InjectedService getFixture() {
- return (InjectedService) fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorsFactory.eINSTANCE.createInjectedService());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // InjectedServiceTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests; + +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.InjectedService; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Injected Service</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class InjectedServiceTest extends InjectedValueTest { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(InjectedServiceTest.class); + } + + /** + * Constructs a new Injected Service test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public InjectedServiceTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Injected Service test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected InjectedService getFixture() { + return (InjectedService) fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorsFactory.eINSTANCE.createInjectedService()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // InjectedServiceTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/InjectedValueTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/InjectedValueTest.java index da9a8de9bf6..f4cf9ad0dc0 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/InjectedValueTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/InjectedValueTest.java @@ -1,60 +1,60 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.InjectedValue;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Injected Value</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public abstract class InjectedValueTest extends TestCase {
-
- /**
- * The fixture for this Injected Value test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected InjectedValue fixture = null;
-
- /**
- * Constructs a new Injected Value test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public InjectedValueTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Injected Value test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void setFixture(InjectedValue fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Injected Value test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected InjectedValue getFixture() {
- return fixture;
- }
-
-} // InjectedValueTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests; + +import junit.framework.TestCase; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.InjectedValue; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Injected Value</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public abstract class InjectedValueTest extends TestCase { + + /** + * The fixture for this Injected Value test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected InjectedValue fixture = null; + + /** + * Constructs a new Injected Value test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public InjectedValueTest(String name) { + super(name); + } + + /** + * Sets the fixture for this Injected Value test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void setFixture(InjectedValue fixture) { + this.fixture = fixture; + } + + /** + * Returns the fixture for this Injected Value test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected InjectedValue getFixture() { + return fixture; + } + +} // InjectedValueTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/MethodInjectionTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/MethodInjectionTest.java index c0e73498b86..c8e9f26dba5 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/MethodInjectionTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/MethodInjectionTest.java @@ -1,76 +1,76 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.MethodInjection;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Method Injection</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class MethodInjectionTest extends AbstractMethodInjectionTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(MethodInjectionTest.class);
- }
-
- /**
- * Constructs a new Method Injection test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public MethodInjectionTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Method Injection test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected MethodInjection getFixture() {
- return (MethodInjection) fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorsFactory.eINSTANCE.createMethodInjection());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // MethodInjectionTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests; + +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.MethodInjection; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Method Injection</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class MethodInjectionTest extends AbstractMethodInjectionTest { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(MethodInjectionTest.class); + } + + /** + * Constructs a new Method Injection test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public MethodInjectionTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Method Injection test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected MethodInjection getFixture() { + return (MethodInjection) fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorsFactory.eINSTANCE.createMethodInjection()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // MethodInjectionTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/OpaqueInjectedValueTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/OpaqueInjectedValueTest.java index 18b3e975810..cb9179b40d0 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/OpaqueInjectedValueTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/OpaqueInjectedValueTest.java @@ -1,76 +1,76 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.OpaqueInjectedValue;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Opaque Injected Value</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class OpaqueInjectedValueTest extends InjectedValueTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(OpaqueInjectedValueTest.class);
- }
-
- /**
- * Constructs a new Opaque Injected Value test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public OpaqueInjectedValueTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Opaque Injected Value test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected OpaqueInjectedValue getFixture() {
- return (OpaqueInjectedValue) fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorsFactory.eINSTANCE.createOpaqueInjectedValue());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // OpaqueInjectedValueTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests; + +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.OpaqueInjectedValue; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Opaque Injected Value</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class OpaqueInjectedValueTest extends InjectedValueTest { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(OpaqueInjectedValueTest.class); + } + + /** + * Constructs a new Opaque Injected Value test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public OpaqueInjectedValueTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Opaque Injected Value test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected OpaqueInjectedValue getFixture() { + return (OpaqueInjectedValue) fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorsFactory.eINSTANCE.createOpaqueInjectedValue()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // OpaqueInjectedValueTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ParameterInjectionTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ParameterInjectionTest.java index 42581841ff1..270c3320b15 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ParameterInjectionTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ParameterInjectionTest.java @@ -1,96 +1,96 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests;
-
-import junit.framework.TestCase;
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ParameterInjection;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Parameter Injection</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class ParameterInjectionTest extends TestCase {
-
- /**
- * The fixture for this Parameter Injection test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected ParameterInjection fixture = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(ParameterInjectionTest.class);
- }
-
- /**
- * Constructs a new Parameter Injection test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public ParameterInjectionTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Parameter Injection test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void setFixture(ParameterInjection fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Parameter Injection test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected ParameterInjection getFixture() {
- return fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorsFactory.eINSTANCE.createParameterInjection());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // ParameterInjectionTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests; + +import junit.framework.TestCase; +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ParameterInjection; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Parameter Injection</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class ParameterInjectionTest extends TestCase { + + /** + * The fixture for this Parameter Injection test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected ParameterInjection fixture = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(ParameterInjectionTest.class); + } + + /** + * Constructs a new Parameter Injection test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public ParameterInjectionTest(String name) { + super(name); + } + + /** + * Sets the fixture for this Parameter Injection test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void setFixture(ParameterInjection fixture) { + this.fixture = fixture; + } + + /** + * Returns the fixture for this Parameter Injection test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected ParameterInjection getFixture() { + return fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorsFactory.eINSTANCE.createParameterInjection()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // ParameterInjectionTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/PropertyInjectionTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/PropertyInjectionTest.java index ae5ade2be0a..651a0b3acce 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/PropertyInjectionTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/PropertyInjectionTest.java @@ -1,76 +1,76 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.PropertyInjection;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Property Injection</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class PropertyInjectionTest extends FeatureInjectionTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(PropertyInjectionTest.class);
- }
-
- /**
- * Constructs a new Property Injection test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public PropertyInjectionTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Property Injection test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected PropertyInjection getFixture() {
- return (PropertyInjection) fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorsFactory.eINSTANCE.createPropertyInjection());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // PropertyInjectionTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests; + +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.PropertyInjection; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Property Injection</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class PropertyInjectionTest extends FeatureInjectionTest { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(PropertyInjectionTest.class); + } + + /** + * Constructs a new Property Injection test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public PropertyInjectionTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Property Injection test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected PropertyInjection getFixture() { + return (PropertyInjection) fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorsFactory.eINSTANCE.createPropertyInjection()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // PropertyInjectionTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/RegistryDescTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/RegistryDescTest.java index e03a781bb59..a955529b000 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/RegistryDescTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/RegistryDescTest.java @@ -1,161 +1,161 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests;
-
-import junit.framework.TestCase;
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Registry Desc</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following operations are tested:
- * <ul>
- * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#getServiceDesc(java.lang.String) <em>Get Service Desc</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#getServiceSetDesc(java.lang.String) <em>Get Service Set Desc</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#serviceSetsContains(java.lang.String) <em>Service Sets Contains</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#servicesContains(java.lang.String) <em>Services Contains</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class RegistryDescTest extends TestCase {
-
- /**
- * The fixture for this Registry Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected RegistryDesc fixture = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(RegistryDescTest.class);
- }
-
- /**
- * Constructs a new Registry Desc test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public RegistryDescTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Registry Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void setFixture(RegistryDesc fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Registry Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected RegistryDesc getFixture() {
- return fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorsFactory.eINSTANCE.createRegistryDesc());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
- /**
- * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#getServiceDesc(java.lang.String) <em>Get Service Desc</em>}' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#getServiceDesc(java.lang.String)
- * @generated
- */
- public void testGetServiceDesc__String() {
- // TODO: implement this operation test method
- // Ensure that you remove @generated or mark it @generated NOT
- fail();
- }
-
- /**
- * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#getServiceSetDesc(java.lang.String) <em>Get Service Set Desc</em>}' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#getServiceSetDesc(java.lang.String)
- * @generated
- */
- public void testGetServiceSetDesc__String() {
- // TODO: implement this operation test method
- // Ensure that you remove @generated or mark it @generated NOT
- fail();
- }
-
- /**
- * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#servicesContains(java.lang.String) <em>Services Contains</em>}' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#servicesContains(java.lang.String)
- * @generated
- */
- public void testServicesContains__String() {
- // TODO: implement this operation test method
- // Ensure that you remove @generated or mark it @generated NOT
- fail();
- }
-
- /**
- * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#serviceSetsContains(java.lang.String) <em>Service Sets Contains</em>}' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#serviceSetsContains(java.lang.String)
- * @generated
- */
- public void testServiceSetsContains__String() {
- // TODO: implement this operation test method
- // Ensure that you remove @generated or mark it @generated NOT
- fail();
- }
-
-} // RegistryDescTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests; + +import junit.framework.TestCase; +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Registry Desc</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following operations are tested: + * <ul> + * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#getServiceDesc(java.lang.String) <em>Get Service Desc</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#getServiceSetDesc(java.lang.String) <em>Get Service Set Desc</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#serviceSetsContains(java.lang.String) <em>Service Sets Contains</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#servicesContains(java.lang.String) <em>Services Contains</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class RegistryDescTest extends TestCase { + + /** + * The fixture for this Registry Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected RegistryDesc fixture = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(RegistryDescTest.class); + } + + /** + * Constructs a new Registry Desc test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public RegistryDescTest(String name) { + super(name); + } + + /** + * Sets the fixture for this Registry Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void setFixture(RegistryDesc fixture) { + this.fixture = fixture; + } + + /** + * Returns the fixture for this Registry Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected RegistryDesc getFixture() { + return fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorsFactory.eINSTANCE.createRegistryDesc()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + + /** + * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#getServiceDesc(java.lang.String) <em>Get Service Desc</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#getServiceDesc(java.lang.String) + * @generated + */ + public void testGetServiceDesc__String() { + // TODO: implement this operation test method + // Ensure that you remove @generated or mark it @generated NOT + fail(); + } + + /** + * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#getServiceSetDesc(java.lang.String) <em>Get Service Set Desc</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#getServiceSetDesc(java.lang.String) + * @generated + */ + public void testGetServiceSetDesc__String() { + // TODO: implement this operation test method + // Ensure that you remove @generated or mark it @generated NOT + fail(); + } + + /** + * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#servicesContains(java.lang.String) <em>Services Contains</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#servicesContains(java.lang.String) + * @generated + */ + public void testServicesContains__String() { + // TODO: implement this operation test method + // Ensure that you remove @generated or mark it @generated NOT + fail(); + } + + /** + * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#serviceSetsContains(java.lang.String) <em>Service Sets Contains</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc#serviceSetsContains(java.lang.String) + * @generated + */ + public void testServiceSetsContains__String() { + // TODO: implement this operation test method + // Ensure that you remove @generated or mark it @generated NOT + fail(); + } + +} // RegistryDescTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServiceDescTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServiceDescTest.java index 46b022e12fa..a3f45327d49 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServiceDescTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServiceDescTest.java @@ -1,76 +1,76 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServiceDesc;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Service Desc</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class ServiceDescTest extends AbstractServiceDescTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(ServiceDescTest.class);
- }
-
- /**
- * Constructs a new Service Desc test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public ServiceDescTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Service Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected ServiceDesc getFixture() {
- return (ServiceDesc) fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorsFactory.eINSTANCE.createServiceDesc());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // ServiceDescTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests; + +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServiceDesc; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Service Desc</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class ServiceDescTest extends AbstractServiceDescTest { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(ServiceDescTest.class); + } + + /** + * Constructs a new Service Desc test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public ServiceDescTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Service Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected ServiceDesc getFixture() { + return (ServiceDesc) fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorsFactory.eINSTANCE.createServiceDesc()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // ServiceDescTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServiceFactoryDescTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServiceFactoryDescTest.java index 4a893d89273..2fd2e9bef46 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServiceFactoryDescTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServiceFactoryDescTest.java @@ -1,76 +1,76 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServiceFactoryDesc;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Service Factory Desc</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class ServiceFactoryDescTest extends ServiceDescTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(ServiceFactoryDescTest.class);
- }
-
- /**
- * Constructs a new Service Factory Desc test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public ServiceFactoryDescTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Service Factory Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected ServiceFactoryDesc getFixture() {
- return (ServiceFactoryDesc) fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorsFactory.eINSTANCE.createServiceFactoryDesc());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // ServiceFactoryDescTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests; + +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServiceFactoryDesc; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Service Factory Desc</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class ServiceFactoryDescTest extends ServiceDescTest { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(ServiceFactoryDescTest.class); + } + + /** + * Constructs a new Service Factory Desc test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public ServiceFactoryDescTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Service Factory Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected ServiceFactoryDesc getFixture() { + return (ServiceFactoryDesc) fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorsFactory.eINSTANCE.createServiceFactoryDesc()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // ServiceFactoryDescTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServiceSetDescTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServiceSetDescTest.java index 029df7ccc69..1e742bde5be 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServiceSetDescTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServiceSetDescTest.java @@ -1,131 +1,131 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests;
-
-import junit.framework.TestCase;
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServiceSetDesc;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Service Set Desc</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following operations are tested:
- * <ul>
- * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServiceSetDesc#getServiceDesc(java.lang.String) <em>Get Service Desc</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServiceSetDesc#servicesContains(java.lang.String) <em>Services Contains</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ServiceSetDescTest extends TestCase {
-
- /**
- * The fixture for this Service Set Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected ServiceSetDesc fixture = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(ServiceSetDescTest.class);
- }
-
- /**
- * Constructs a new Service Set Desc test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public ServiceSetDescTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Service Set Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void setFixture(ServiceSetDesc fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Service Set Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected ServiceSetDesc getFixture() {
- return fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorsFactory.eINSTANCE.createServiceSetDesc());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
- /**
- * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServiceSetDesc#getServiceDesc(java.lang.String) <em>Get Service Desc</em>}' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServiceSetDesc#getServiceDesc(java.lang.String)
- * @generated
- */
- public void testGetServiceDesc__String() {
- // TODO: implement this operation test method
- // Ensure that you remove @generated or mark it @generated NOT
- fail();
- }
-
- /**
- * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServiceSetDesc#servicesContains(java.lang.String) <em>Services Contains</em>}' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServiceSetDesc#servicesContains(java.lang.String)
- * @generated
- */
- public void testServicesContains__String() {
- // TODO: implement this operation test method
- // Ensure that you remove @generated or mark it @generated NOT
- fail();
- }
-
-} // ServiceSetDescTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests; + +import junit.framework.TestCase; +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServiceSetDesc; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Service Set Desc</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following operations are tested: + * <ul> + * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServiceSetDesc#getServiceDesc(java.lang.String) <em>Get Service Desc</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServiceSetDesc#servicesContains(java.lang.String) <em>Services Contains</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class ServiceSetDescTest extends TestCase { + + /** + * The fixture for this Service Set Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected ServiceSetDesc fixture = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(ServiceSetDescTest.class); + } + + /** + * Constructs a new Service Set Desc test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public ServiceSetDescTest(String name) { + super(name); + } + + /** + * Sets the fixture for this Service Set Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void setFixture(ServiceSetDesc fixture) { + this.fixture = fixture; + } + + /** + * Returns the fixture for this Service Set Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected ServiceSetDesc getFixture() { + return fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorsFactory.eINSTANCE.createServiceSetDesc()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + + /** + * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServiceSetDesc#getServiceDesc(java.lang.String) <em>Get Service Desc</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServiceSetDesc#getServiceDesc(java.lang.String) + * @generated + */ + public void testGetServiceDesc__String() { + // TODO: implement this operation test method + // Ensure that you remove @generated or mark it @generated NOT + fail(); + } + + /** + * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServiceSetDesc#servicesContains(java.lang.String) <em>Services Contains</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServiceSetDesc#servicesContains(java.lang.String) + * @generated + */ + public void testServicesContains__String() { + // TODO: implement this operation test method + // Ensure that you remove @generated or mark it @generated NOT + fail(); + } + +} // ServiceSetDescTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServicedescriptorsAllTests.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServicedescriptorsAllTests.java index d29cb19ed18..c2c5d5cdd33 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServicedescriptorsAllTests.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServicedescriptorsAllTests.java @@ -1,50 +1,50 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
-/**
- * <!-- begin-user-doc -->
- * A test suite for the '<em><b>Servicedescriptors</b></em>' model.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class ServicedescriptorsAllTests extends TestSuite {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(suite());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static Test suite() {
- TestSuite suite = new ServicedescriptorsAllTests("Servicedescriptors Tests");
- suite.addTest(ServicedescriptorsTests.suite());
- return suite;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public ServicedescriptorsAllTests(String name) {
- super(name);
- }
-
-} // ServicedescriptorsAllTests
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests; + +import junit.framework.Test; +import junit.framework.TestSuite; +import junit.textui.TestRunner; + +/** + * <!-- begin-user-doc --> + * A test suite for the '<em><b>Servicedescriptors</b></em>' model. + * <!-- end-user-doc --> + * + * @generated + */ +public class ServicedescriptorsAllTests extends TestSuite { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(suite()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static Test suite() { + TestSuite suite = new ServicedescriptorsAllTests("Servicedescriptors Tests"); + suite.addTest(ServicedescriptorsTests.suite()); + return suite; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public ServicedescriptorsAllTests(String name) { + super(name); + } + +} // ServicedescriptorsAllTests diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServicedescriptorsExample.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServicedescriptorsExample.java index 871dc029918..0e765feb33b 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServicedescriptorsExample.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServicedescriptorsExample.java @@ -1,119 +1,119 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.emf.ecore.util.Diagnostician;
-import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsPackage;
-
-/**
- * <!-- begin-user-doc -->
- * A sample utility for the '<em><b>servicedescriptors</b></em>' package.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class ServicedescriptorsExample {
- /**
- * <!-- begin-user-doc -->
- * Load all the argument file paths or URIs as instances of the model.
- * <!-- end-user-doc -->
- *
- * @param args
- * the file paths or URIs.
- * @generated
- */
- public static void main(String[] args) {
- // Create a resource set to hold the resources.
- //
- ResourceSet resourceSet = new ResourceSetImpl();
-
- // Register the appropriate resource factory to handle all file extensions.
- //
- resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put
- (Resource.Factory.Registry.DEFAULT_EXTENSION,
- new XMIResourceFactoryImpl());
-
- // Register the package to ensure it is available during loading.
- //
- resourceSet.getPackageRegistry().put
- (ServicedescriptorsPackage.eNS_URI,
- ServicedescriptorsPackage.eINSTANCE);
-
- // If there are no arguments, emit an appropriate usage message.
- //
- if (args.length == 0) {
- System.out.println("Enter a list of file paths or URIs that have content like this:");
- try {
- Resource resource = resourceSet.createResource(URI.createURI("http:///My.servicedescriptors"));
- RegistryDesc root = ServicedescriptorsFactory.eINSTANCE.createRegistryDesc();
- resource.getContents().add(root);
- resource.save(System.out, null);
- } catch (IOException exception) {
- exception.printStackTrace();
- }
- }
- else {
- // Iterate over all the arguments.
- //
- for (int i = 0; i < args.length; ++i) {
- // Construct the URI for the instance file.
- // The argument is treated as a file path only if it denotes an existing file.
- // Otherwise, it's directly treated as a URL.
- //
- File file = new File(args[i]);
- URI uri = file.isFile() ? URI.createFileURI(file.getAbsolutePath()) : URI.createURI(args[i]);
-
- try {
- // Demand load resource for this file.
- //
- Resource resource = resourceSet.getResource(uri, true);
- System.out.println("Loaded " + uri);
-
- // Validate the contents of the loaded resource.
- //
- for (EObject eObject : resource.getContents()) {
- Diagnostic diagnostic = Diagnostician.INSTANCE.validate(eObject);
- if (diagnostic.getSeverity() != Diagnostic.OK) {
- printDiagnostic(diagnostic, "");
- }
- }
- } catch (RuntimeException exception) {
- System.out.println("Problem loading " + uri);
- exception.printStackTrace();
- }
- }
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * Prints diagnostics with indentation.
- * <!-- end-user-doc -->
- *
- * @param diagnostic
- * the diagnostic to print.
- * @param indent
- * the indentation for printing.
- * @generated
- */
- protected static void printDiagnostic(Diagnostic diagnostic, String indent) {
- System.out.print(indent);
- System.out.println(diagnostic.getMessage());
- for (Diagnostic child : diagnostic.getChildren()) {
- printDiagnostic(child, indent + " ");
- }
- }
-
-} // ServicedescriptorsExample
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests; + +import java.io.File; +import java.io.IOException; + +import org.eclipse.emf.common.util.Diagnostic; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.emf.ecore.util.Diagnostician; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.RegistryDesc; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsFactory; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.ServicedescriptorsPackage; + +/** + * <!-- begin-user-doc --> + * A sample utility for the '<em><b>servicedescriptors</b></em>' package. + * <!-- end-user-doc --> + * + * @generated + */ +public class ServicedescriptorsExample { + /** + * <!-- begin-user-doc --> + * Load all the argument file paths or URIs as instances of the model. + * <!-- end-user-doc --> + * + * @param args + * the file paths or URIs. + * @generated + */ + public static void main(String[] args) { + // Create a resource set to hold the resources. + // + ResourceSet resourceSet = new ResourceSetImpl(); + + // Register the appropriate resource factory to handle all file extensions. + // + resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put + (Resource.Factory.Registry.DEFAULT_EXTENSION, + new XMIResourceFactoryImpl()); + + // Register the package to ensure it is available during loading. + // + resourceSet.getPackageRegistry().put + (ServicedescriptorsPackage.eNS_URI, + ServicedescriptorsPackage.eINSTANCE); + + // If there are no arguments, emit an appropriate usage message. + // + if (args.length == 0) { + System.out.println("Enter a list of file paths or URIs that have content like this:"); + try { + Resource resource = resourceSet.createResource(URI.createURI("http:///My.servicedescriptors")); + RegistryDesc root = ServicedescriptorsFactory.eINSTANCE.createRegistryDesc(); + resource.getContents().add(root); + resource.save(System.out, null); + } catch (IOException exception) { + exception.printStackTrace(); + } + } + else { + // Iterate over all the arguments. + // + for (int i = 0; i < args.length; ++i) { + // Construct the URI for the instance file. + // The argument is treated as a file path only if it denotes an existing file. + // Otherwise, it's directly treated as a URL. + // + File file = new File(args[i]); + URI uri = file.isFile() ? URI.createFileURI(file.getAbsolutePath()) : URI.createURI(args[i]); + + try { + // Demand load resource for this file. + // + Resource resource = resourceSet.getResource(uri, true); + System.out.println("Loaded " + uri); + + // Validate the contents of the loaded resource. + // + for (EObject eObject : resource.getContents()) { + Diagnostic diagnostic = Diagnostician.INSTANCE.validate(eObject); + if (diagnostic.getSeverity() != Diagnostic.OK) { + printDiagnostic(diagnostic, ""); + } + } + } catch (RuntimeException exception) { + System.out.println("Problem loading " + uri); + exception.printStackTrace(); + } + } + } + } + + /** + * <!-- begin-user-doc --> + * Prints diagnostics with indentation. + * <!-- end-user-doc --> + * + * @param diagnostic + * the diagnostic to print. + * @param indent + * the indentation for printing. + * @generated + */ + protected static void printDiagnostic(Diagnostic diagnostic, String indent) { + System.out.print(indent); + System.out.println(diagnostic.getMessage()); + for (Diagnostic child : diagnostic.getChildren()) { + printDiagnostic(child, indent + " "); + } + } + +} // ServicedescriptorsExample diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServicedescriptorsTests.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServicedescriptorsTests.java index 742474f3da9..88d9332bc6d 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServicedescriptorsTests.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptors/tests/ServicedescriptorsTests.java @@ -1,52 +1,52 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
-/**
- * <!-- begin-user-doc -->
- * A test suite for the '<em><b>servicedescriptors</b></em>' package.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class ServicedescriptorsTests extends TestSuite {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(suite());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static Test suite() {
- TestSuite suite = new ServicedescriptorsTests("servicedescriptors Tests");
- suite.addTestSuite(RegistryDescTest.class);
- suite.addTestSuite(ServiceSetDescTest.class);
- suite.addTestSuite(DescriptorsTest.class);
- return suite;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public ServicedescriptorsTests(String name) {
- super(name);
- }
-
-} // ServicedescriptorsTests
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptors.tests; + +import junit.framework.Test; +import junit.framework.TestSuite; +import junit.textui.TestRunner; + +/** + * <!-- begin-user-doc --> + * A test suite for the '<em><b>servicedescriptors</b></em>' package. + * <!-- end-user-doc --> + * + * @generated + */ +public class ServicedescriptorsTests extends TestSuite { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(suite()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static Test suite() { + TestSuite suite = new ServicedescriptorsTests("servicedescriptors Tests"); + suite.addTestSuite(RegistryDescTest.class); + suite.addTestSuite(ServiceSetDescTest.class); + suite.addTestSuite(DescriptorsTest.class); + return suite; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public ServicedescriptorsTests(String name) { + super(name); + } + +} // ServicedescriptorsTests diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AbstractMethodInjectionTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AbstractMethodInjectionTest.java index 0496f6bb60b..bffafb419a6 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AbstractMethodInjectionTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AbstractMethodInjectionTest.java @@ -1,39 +1,39 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractMethodInjection;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Abstract Method Injection</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public abstract class AbstractMethodInjectionTest extends FeatureInjectionTest {
-
- /**
- * Constructs a new Abstract Method Injection test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public AbstractMethodInjectionTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Abstract Method Injection test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected AbstractMethodInjection getFixture() {
- return (AbstractMethodInjection) fixture;
- }
-
-} // AbstractMethodInjectionTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractMethodInjection; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Abstract Method Injection</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public abstract class AbstractMethodInjectionTest extends FeatureInjectionTest { + + /** + * Constructs a new Abstract Method Injection test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public AbstractMethodInjectionTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Abstract Method Injection test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected AbstractMethodInjection getFixture() { + return (AbstractMethodInjection) fixture; + } + +} // AbstractMethodInjectionTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AbstractServiceDescTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AbstractServiceDescTest.java index 3f4aa210179..46c8c928cca 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AbstractServiceDescTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AbstractServiceDescTest.java @@ -1,60 +1,60 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Abstract Service Desc</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public abstract class AbstractServiceDescTest extends TestCase {
-
- /**
- * The fixture for this Abstract Service Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected AbstractServiceIdDesc fixture = null;
-
- /**
- * Constructs a new Abstract Service Desc test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public AbstractServiceDescTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Abstract Service Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void setFixture(AbstractServiceIdDesc fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Abstract Service Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected AbstractServiceIdDesc getFixture() {
- return fixture;
- }
-
-} // AbstractServiceDescTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.framework.TestCase; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Abstract Service Desc</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public abstract class AbstractServiceDescTest extends TestCase { + + /** + * The fixture for this Abstract Service Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected AbstractServiceIdDesc fixture = null; + + /** + * Constructs a new Abstract Service Desc test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public AbstractServiceDescTest(String name) { + super(name); + } + + /** + * Sets the fixture for this Abstract Service Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void setFixture(AbstractServiceIdDesc fixture) { + this.fixture = fixture; + } + + /** + * Returns the fixture for this Abstract Service Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected AbstractServiceIdDesc getFixture() { + return fixture; + } + +} // AbstractServiceDescTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AbstractServiceIdDescTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AbstractServiceIdDescTest.java index a663475affb..e3d4e8200cd 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AbstractServiceIdDescTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AbstractServiceIdDescTest.java @@ -1,60 +1,60 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Abstract Service Id Desc</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public abstract class AbstractServiceIdDescTest extends TestCase {
-
- /**
- * The fixture for this Abstract Service Id Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected AbstractServiceIdDesc fixture = null;
-
- /**
- * Constructs a new Abstract Service Id Desc test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public AbstractServiceIdDescTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Abstract Service Id Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void setFixture(AbstractServiceIdDesc fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Abstract Service Id Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected AbstractServiceIdDesc getFixture() {
- return fixture;
- }
-
-} // AbstractServiceIdDescTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.framework.TestCase; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Abstract Service Id Desc</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public abstract class AbstractServiceIdDescTest extends TestCase { + + /** + * The fixture for this Abstract Service Id Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected AbstractServiceIdDesc fixture = null; + + /** + * Constructs a new Abstract Service Id Desc test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public AbstractServiceIdDescTest(String name) { + super(name); + } + + /** + * Sets the fixture for this Abstract Service Id Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void setFixture(AbstractServiceIdDesc fixture) { + this.fixture = fixture; + } + + /** + * Returns the fixture for this Abstract Service Id Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected AbstractServiceIdDesc getFixture() { + return fixture; + } + +} // AbstractServiceIdDescTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AliasDescTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AliasDescTest.java index 888b14b5f39..383b9af7a38 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AliasDescTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AliasDescTest.java @@ -1,76 +1,76 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AliasIdDesc;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Alias Desc</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class AliasDescTest extends AbstractServiceDescTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(AliasDescTest.class);
- }
-
- /**
- * Constructs a new Alias Desc test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public AliasDescTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Alias Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected AliasIdDesc getFixture() {
- return (AliasIdDesc) fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorswithidFactory.eINSTANCE.createAliasIdDesc());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // AliasDescTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AliasIdDesc; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Alias Desc</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class AliasDescTest extends AbstractServiceDescTest { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(AliasDescTest.class); + } + + /** + * Constructs a new Alias Desc test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public AliasDescTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Alias Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected AliasIdDesc getFixture() { + return (AliasIdDesc) fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorswithidFactory.eINSTANCE.createAliasIdDesc()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // AliasDescTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AliasIdDescTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AliasIdDescTest.java index 4c4391bef70..4d11f3fa00a 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AliasIdDescTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/AliasIdDescTest.java @@ -1,76 +1,76 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AliasIdDesc;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Alias Id Desc</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class AliasIdDescTest extends AbstractServiceIdDescTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(AliasIdDescTest.class);
- }
-
- /**
- * Constructs a new Alias Id Desc test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public AliasIdDescTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Alias Id Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected AliasIdDesc getFixture() {
- return (AliasIdDesc) fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorswithidFactory.eINSTANCE.createAliasIdDesc());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // AliasIdDescTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AliasIdDesc; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Alias Id Desc</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class AliasIdDescTest extends AbstractServiceIdDescTest { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(AliasIdDescTest.class); + } + + /** + * Constructs a new Alias Id Desc test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public AliasIdDescTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Alias Id Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected AliasIdDesc getFixture() { + return (AliasIdDesc) fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorswithidFactory.eINSTANCE.createAliasIdDesc()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // AliasIdDescTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ConstructorInjectionTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ConstructorInjectionTest.java index 4026a6a42ac..ff303e3da13 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ConstructorInjectionTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ConstructorInjectionTest.java @@ -1,76 +1,76 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ConstructorInjection;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Constructor Injection</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class ConstructorInjectionTest extends AbstractMethodInjectionTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(ConstructorInjectionTest.class);
- }
-
- /**
- * Constructs a new Constructor Injection test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public ConstructorInjectionTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Constructor Injection test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected ConstructorInjection getFixture() {
- return (ConstructorInjection) fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorswithidFactory.eINSTANCE.createConstructorInjection());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // ConstructorInjectionTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ConstructorInjection; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Constructor Injection</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class ConstructorInjectionTest extends AbstractMethodInjectionTest { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(ConstructorInjectionTest.class); + } + + /** + * Constructs a new Constructor Injection test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public ConstructorInjectionTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Constructor Injection test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected ConstructorInjection getFixture() { + return (ConstructorInjection) fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorswithidFactory.eINSTANCE.createConstructorInjection()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // ConstructorInjectionTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/DescriptorsTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/DescriptorsTest.java index ae48b359ba1..799d469f103 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/DescriptorsTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/DescriptorsTest.java @@ -1,96 +1,96 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.framework.TestCase;
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.IdDescriptors;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>IdDescriptors</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class DescriptorsTest extends TestCase {
-
- /**
- * The fixture for this IdDescriptors test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected IdDescriptors fixture = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(DescriptorsTest.class);
- }
-
- /**
- * Constructs a new IdDescriptors test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public DescriptorsTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this IdDescriptors test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void setFixture(IdDescriptors fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this IdDescriptors test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected IdDescriptors getFixture() {
- return fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorswithidFactory.eINSTANCE.createIdDescriptors());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // DescriptorsTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.framework.TestCase; +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.IdDescriptors; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>IdDescriptors</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class DescriptorsTest extends TestCase { + + /** + * The fixture for this IdDescriptors test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected IdDescriptors fixture = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(DescriptorsTest.class); + } + + /** + * Constructs a new IdDescriptors test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public DescriptorsTest(String name) { + super(name); + } + + /** + * Sets the fixture for this IdDescriptors test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void setFixture(IdDescriptors fixture) { + this.fixture = fixture; + } + + /** + * Returns the fixture for this IdDescriptors test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected IdDescriptors getFixture() { + return fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorswithidFactory.eINSTANCE.createIdDescriptors()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // DescriptorsTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/FeatureInjectionTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/FeatureInjectionTest.java index aac68ba88f0..2d9e1ef1a75 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/FeatureInjectionTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/FeatureInjectionTest.java @@ -1,60 +1,60 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.FeatureInjection;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Feature Injection</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public abstract class FeatureInjectionTest extends TestCase {
-
- /**
- * The fixture for this Feature Injection test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected FeatureInjection fixture = null;
-
- /**
- * Constructs a new Feature Injection test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public FeatureInjectionTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Feature Injection test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void setFixture(FeatureInjection fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Feature Injection test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected FeatureInjection getFixture() {
- return fixture;
- }
-
-} // FeatureInjectionTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.framework.TestCase; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.FeatureInjection; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Feature Injection</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public abstract class FeatureInjectionTest extends TestCase { + + /** + * The fixture for this Feature Injection test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected FeatureInjection fixture = null; + + /** + * Constructs a new Feature Injection test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public FeatureInjectionTest(String name) { + super(name); + } + + /** + * Sets the fixture for this Feature Injection test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void setFixture(FeatureInjection fixture) { + this.fixture = fixture; + } + + /** + * Returns the fixture for this Feature Injection test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected FeatureInjection getFixture() { + return fixture; + } + +} // FeatureInjectionTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/IdDescriptorsTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/IdDescriptorsTest.java index 26b05c2f2c8..ee2cca1a044 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/IdDescriptorsTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/IdDescriptorsTest.java @@ -1,96 +1,96 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.framework.TestCase;
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.IdDescriptors;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Id Descriptors</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class IdDescriptorsTest extends TestCase {
-
- /**
- * The fixture for this Id Descriptors test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected IdDescriptors fixture = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(IdDescriptorsTest.class);
- }
-
- /**
- * Constructs a new Id Descriptors test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public IdDescriptorsTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Id Descriptors test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void setFixture(IdDescriptors fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Id Descriptors test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected IdDescriptors getFixture() {
- return fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorswithidFactory.eINSTANCE.createIdDescriptors());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // IdDescriptorsTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.framework.TestCase; +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.IdDescriptors; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Id Descriptors</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class IdDescriptorsTest extends TestCase { + + /** + * The fixture for this Id Descriptors test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected IdDescriptors fixture = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(IdDescriptorsTest.class); + } + + /** + * Constructs a new Id Descriptors test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public IdDescriptorsTest(String name) { + super(name); + } + + /** + * Sets the fixture for this Id Descriptors test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void setFixture(IdDescriptors fixture) { + this.fixture = fixture; + } + + /** + * Returns the fixture for this Id Descriptors test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected IdDescriptors getFixture() { + return fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorswithidFactory.eINSTANCE.createIdDescriptors()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // IdDescriptorsTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/InjectedServiceTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/InjectedServiceTest.java index 29a70fa3542..46f506e5655 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/InjectedServiceTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/InjectedServiceTest.java @@ -1,76 +1,76 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.InjectedService;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Injected Service</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class InjectedServiceTest extends InjectedValueTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(InjectedServiceTest.class);
- }
-
- /**
- * Constructs a new Injected Service test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public InjectedServiceTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Injected Service test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected InjectedService getFixture() {
- return (InjectedService) fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorswithidFactory.eINSTANCE.createInjectedService());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // InjectedServiceTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.InjectedService; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Injected Service</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class InjectedServiceTest extends InjectedValueTest { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(InjectedServiceTest.class); + } + + /** + * Constructs a new Injected Service test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public InjectedServiceTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Injected Service test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected InjectedService getFixture() { + return (InjectedService) fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorswithidFactory.eINSTANCE.createInjectedService()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // InjectedServiceTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/InjectedValueTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/InjectedValueTest.java index e78ee23e5cd..2e154b2370e 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/InjectedValueTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/InjectedValueTest.java @@ -1,60 +1,60 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.InjectedValue;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Injected Value</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public abstract class InjectedValueTest extends TestCase {
-
- /**
- * The fixture for this Injected Value test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected InjectedValue fixture = null;
-
- /**
- * Constructs a new Injected Value test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public InjectedValueTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Injected Value test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void setFixture(InjectedValue fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Injected Value test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected InjectedValue getFixture() {
- return fixture;
- }
-
-} // InjectedValueTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.framework.TestCase; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.InjectedValue; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Injected Value</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public abstract class InjectedValueTest extends TestCase { + + /** + * The fixture for this Injected Value test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected InjectedValue fixture = null; + + /** + * Constructs a new Injected Value test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public InjectedValueTest(String name) { + super(name); + } + + /** + * Sets the fixture for this Injected Value test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void setFixture(InjectedValue fixture) { + this.fixture = fixture; + } + + /** + * Returns the fixture for this Injected Value test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected InjectedValue getFixture() { + return fixture; + } + +} // InjectedValueTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/MethodInjectionTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/MethodInjectionTest.java index 1c8a4156acb..6e780db06e3 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/MethodInjectionTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/MethodInjectionTest.java @@ -1,76 +1,76 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.MethodInjection;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Method Injection</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class MethodInjectionTest extends AbstractMethodInjectionTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(MethodInjectionTest.class);
- }
-
- /**
- * Constructs a new Method Injection test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public MethodInjectionTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Method Injection test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected MethodInjection getFixture() {
- return (MethodInjection) fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorswithidFactory.eINSTANCE.createMethodInjection());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // MethodInjectionTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.MethodInjection; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Method Injection</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class MethodInjectionTest extends AbstractMethodInjectionTest { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(MethodInjectionTest.class); + } + + /** + * Constructs a new Method Injection test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public MethodInjectionTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Method Injection test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected MethodInjection getFixture() { + return (MethodInjection) fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorswithidFactory.eINSTANCE.createMethodInjection()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // MethodInjectionTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/OpaqueInjectedValueTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/OpaqueInjectedValueTest.java index ff420fe5d26..4423baf973b 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/OpaqueInjectedValueTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/OpaqueInjectedValueTest.java @@ -1,76 +1,76 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.OpaqueInjectedValue;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Opaque Injected Value</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class OpaqueInjectedValueTest extends InjectedValueTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(OpaqueInjectedValueTest.class);
- }
-
- /**
- * Constructs a new Opaque Injected Value test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public OpaqueInjectedValueTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Opaque Injected Value test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected OpaqueInjectedValue getFixture() {
- return (OpaqueInjectedValue) fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorswithidFactory.eINSTANCE.createOpaqueInjectedValue());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // OpaqueInjectedValueTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.OpaqueInjectedValue; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Opaque Injected Value</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class OpaqueInjectedValueTest extends InjectedValueTest { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(OpaqueInjectedValueTest.class); + } + + /** + * Constructs a new Opaque Injected Value test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public OpaqueInjectedValueTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Opaque Injected Value test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected OpaqueInjectedValue getFixture() { + return (OpaqueInjectedValue) fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorswithidFactory.eINSTANCE.createOpaqueInjectedValue()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // OpaqueInjectedValueTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ParameterInjectionTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ParameterInjectionTest.java index 5e66ebda04b..58c2be75e4f 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ParameterInjectionTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ParameterInjectionTest.java @@ -1,96 +1,96 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.framework.TestCase;
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ParameterInjection;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Parameter Injection</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class ParameterInjectionTest extends TestCase {
-
- /**
- * The fixture for this Parameter Injection test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected ParameterInjection fixture = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(ParameterInjectionTest.class);
- }
-
- /**
- * Constructs a new Parameter Injection test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public ParameterInjectionTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Parameter Injection test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void setFixture(ParameterInjection fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Parameter Injection test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected ParameterInjection getFixture() {
- return fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorswithidFactory.eINSTANCE.createParameterInjection());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // ParameterInjectionTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.framework.TestCase; +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ParameterInjection; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Parameter Injection</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class ParameterInjectionTest extends TestCase { + + /** + * The fixture for this Parameter Injection test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected ParameterInjection fixture = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(ParameterInjectionTest.class); + } + + /** + * Constructs a new Parameter Injection test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public ParameterInjectionTest(String name) { + super(name); + } + + /** + * Sets the fixture for this Parameter Injection test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void setFixture(ParameterInjection fixture) { + this.fixture = fixture; + } + + /** + * Returns the fixture for this Parameter Injection test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected ParameterInjection getFixture() { + return fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorswithidFactory.eINSTANCE.createParameterInjection()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // ParameterInjectionTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/PropertyInjectionTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/PropertyInjectionTest.java index dcd47fef15e..5fa02b0ebb0 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/PropertyInjectionTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/PropertyInjectionTest.java @@ -1,76 +1,76 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.PropertyInjection;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Property Injection</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class PropertyInjectionTest extends FeatureInjectionTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(PropertyInjectionTest.class);
- }
-
- /**
- * Constructs a new Property Injection test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public PropertyInjectionTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Property Injection test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected PropertyInjection getFixture() {
- return (PropertyInjection) fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorswithidFactory.eINSTANCE.createPropertyInjection());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // PropertyInjectionTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.PropertyInjection; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Property Injection</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class PropertyInjectionTest extends FeatureInjectionTest { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(PropertyInjectionTest.class); + } + + /** + * Constructs a new Property Injection test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public PropertyInjectionTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Property Injection test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected PropertyInjection getFixture() { + return (PropertyInjection) fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorswithidFactory.eINSTANCE.createPropertyInjection()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // PropertyInjectionTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/RegistryDescTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/RegistryDescTest.java index ead73c6b99f..de3f28db895 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/RegistryDescTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/RegistryDescTest.java @@ -1,96 +1,96 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.framework.TestCase;
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.RegistryIdDesc;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Registry Desc</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class RegistryDescTest extends TestCase {
-
- /**
- * The fixture for this Registry Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected RegistryIdDesc fixture = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(RegistryDescTest.class);
- }
-
- /**
- * Constructs a new Registry Desc test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public RegistryDescTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Registry Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void setFixture(RegistryIdDesc fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Registry Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected RegistryIdDesc getFixture() {
- return fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorswithidFactory.eINSTANCE.createRegistryIdDesc());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // RegistryDescTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.framework.TestCase; +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.RegistryIdDesc; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Registry Desc</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class RegistryDescTest extends TestCase { + + /** + * The fixture for this Registry Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected RegistryIdDesc fixture = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(RegistryDescTest.class); + } + + /** + * Constructs a new Registry Desc test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public RegistryDescTest(String name) { + super(name); + } + + /** + * Sets the fixture for this Registry Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void setFixture(RegistryIdDesc fixture) { + this.fixture = fixture; + } + + /** + * Returns the fixture for this Registry Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected RegistryIdDesc getFixture() { + return fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorswithidFactory.eINSTANCE.createRegistryIdDesc()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // RegistryDescTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/RegistryIdDescTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/RegistryIdDescTest.java index 473c985f705..a9df50169e1 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/RegistryIdDescTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/RegistryIdDescTest.java @@ -1,96 +1,96 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.framework.TestCase;
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.RegistryIdDesc;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Registry Id Desc</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class RegistryIdDescTest extends TestCase {
-
- /**
- * The fixture for this Registry Id Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected RegistryIdDesc fixture = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(RegistryIdDescTest.class);
- }
-
- /**
- * Constructs a new Registry Id Desc test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public RegistryIdDescTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Registry Id Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void setFixture(RegistryIdDesc fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Registry Id Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected RegistryIdDesc getFixture() {
- return fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorswithidFactory.eINSTANCE.createRegistryIdDesc());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // RegistryIdDescTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.framework.TestCase; +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.RegistryIdDesc; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Registry Id Desc</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class RegistryIdDescTest extends TestCase { + + /** + * The fixture for this Registry Id Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected RegistryIdDesc fixture = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(RegistryIdDescTest.class); + } + + /** + * Constructs a new Registry Id Desc test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public RegistryIdDescTest(String name) { + super(name); + } + + /** + * Sets the fixture for this Registry Id Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void setFixture(RegistryIdDesc fixture) { + this.fixture = fixture; + } + + /** + * Returns the fixture for this Registry Id Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected RegistryIdDesc getFixture() { + return fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorswithidFactory.eINSTANCE.createRegistryIdDesc()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // RegistryIdDescTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceDescTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceDescTest.java index e4957b5f81c..3c18061e319 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceDescTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceDescTest.java @@ -1,76 +1,76 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceIdDesc;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Service Desc</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class ServiceDescTest extends AbstractServiceDescTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(ServiceDescTest.class);
- }
-
- /**
- * Constructs a new Service Desc test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public ServiceDescTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Service Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected ServiceIdDesc getFixture() {
- return (ServiceIdDesc) fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorswithidFactory.eINSTANCE.createServiceIdDesc());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // ServiceDescTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceIdDesc; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Service Desc</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class ServiceDescTest extends AbstractServiceDescTest { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(ServiceDescTest.class); + } + + /** + * Constructs a new Service Desc test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public ServiceDescTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Service Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected ServiceIdDesc getFixture() { + return (ServiceIdDesc) fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorswithidFactory.eINSTANCE.createServiceIdDesc()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // ServiceDescTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceFactoryDescTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceFactoryDescTest.java index 7906b96759b..e87d151fe1a 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceFactoryDescTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceFactoryDescTest.java @@ -1,76 +1,76 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceFactoryIdDesc;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Service Factory Desc</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class ServiceFactoryDescTest extends ServiceDescTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(ServiceFactoryDescTest.class);
- }
-
- /**
- * Constructs a new Service Factory Desc test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public ServiceFactoryDescTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Service Factory Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected ServiceFactoryIdDesc getFixture() {
- return (ServiceFactoryIdDesc) fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorswithidFactory.eINSTANCE.createServiceFactoryIdDesc());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // ServiceFactoryDescTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceFactoryIdDesc; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Service Factory Desc</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class ServiceFactoryDescTest extends ServiceDescTest { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(ServiceFactoryDescTest.class); + } + + /** + * Constructs a new Service Factory Desc test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public ServiceFactoryDescTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Service Factory Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected ServiceFactoryIdDesc getFixture() { + return (ServiceFactoryIdDesc) fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorswithidFactory.eINSTANCE.createServiceFactoryIdDesc()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // ServiceFactoryDescTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceFactoryIdDescTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceFactoryIdDescTest.java index 3ca81969f66..5bbb4d77079 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceFactoryIdDescTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceFactoryIdDescTest.java @@ -1,76 +1,76 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceFactoryIdDesc;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Service Factory Id Desc</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class ServiceFactoryIdDescTest extends ServiceIdDescTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(ServiceFactoryIdDescTest.class);
- }
-
- /**
- * Constructs a new Service Factory Id Desc test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public ServiceFactoryIdDescTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Service Factory Id Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected ServiceFactoryIdDesc getFixture() {
- return (ServiceFactoryIdDesc) fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorswithidFactory.eINSTANCE.createServiceFactoryIdDesc());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // ServiceFactoryIdDescTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceFactoryIdDesc; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Service Factory Id Desc</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class ServiceFactoryIdDescTest extends ServiceIdDescTest { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(ServiceFactoryIdDescTest.class); + } + + /** + * Constructs a new Service Factory Id Desc test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public ServiceFactoryIdDescTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Service Factory Id Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected ServiceFactoryIdDesc getFixture() { + return (ServiceFactoryIdDesc) fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorswithidFactory.eINSTANCE.createServiceFactoryIdDesc()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // ServiceFactoryIdDescTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceIdDescTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceIdDescTest.java index 5ed8512a64b..cc0034dfaf0 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceIdDescTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceIdDescTest.java @@ -1,76 +1,76 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceIdDesc;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Service Id Desc</b></em>'.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class ServiceIdDescTest extends AbstractServiceIdDescTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(ServiceIdDescTest.class);
- }
-
- /**
- * Constructs a new Service Id Desc test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public ServiceIdDescTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Service Id Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected ServiceIdDesc getFixture() {
- return (ServiceIdDesc) fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorswithidFactory.eINSTANCE.createServiceIdDesc());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} // ServiceIdDescTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceIdDesc; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Service Id Desc</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class ServiceIdDescTest extends AbstractServiceIdDescTest { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(ServiceIdDescTest.class); + } + + /** + * Constructs a new Service Id Desc test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public ServiceIdDescTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Service Id Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected ServiceIdDesc getFixture() { + return (ServiceIdDesc) fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorswithidFactory.eINSTANCE.createServiceIdDesc()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} // ServiceIdDescTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceSetIdDescTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceSetIdDescTest.java index f3ea8783ee4..eed516af413 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceSetIdDescTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceSetIdDescTest.java @@ -1,162 +1,162 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.framework.TestCase;
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Service Set Id Desc</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following operations are tested:
- * <ul>
- * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(java.lang.Object) <em>Get Service</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(java.lang.Object) <em>Contains Service</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc) <em>Get Service</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc) <em>Contains Service</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ServiceSetIdDescTest extends TestCase {
-
- /**
- * The fixture for this Service Set Id Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected ServiceSetIdDesc fixture = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(ServiceSetIdDescTest.class);
- }
-
- /**
- * Constructs a new Service Set Id Desc test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public ServiceSetIdDescTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Service Set Id Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void setFixture(ServiceSetIdDesc fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Service Set Id Desc test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected ServiceSetIdDesc getFixture() {
- return fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorswithidFactory.eINSTANCE.createServiceSetIdDesc());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
- /**
- * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(java.lang.Object) <em>Get Service</em>}' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(java.lang.Object)
- * @generated
- */
- public void testGetService__Object() {
- // TODO: implement this operation test method
- // Ensure that you remove @generated or mark it @generated NOT
- fail();
- }
-
- /**
- * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(java.lang.Object) <em>Contains Service</em>}' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(java.lang.Object)
- * @generated
- */
- public void testContainsService__Object() {
- // TODO: implement this operation test method
- // Ensure that you remove @generated or mark it @generated NOT
- fail();
- }
-
- /**
- * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc) <em>Get Service</em>}' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc)
- * @generated
- */
- public void testGetService__AbstractServiceIdDesc() {
- // TODO: implement this operation test method
- // Ensure that you remove @generated or mark it @generated NOT
- fail();
- }
-
- /**
- * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc) <em>Contains Service</em>}'
- * operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc)
- * @generated
- */
- public void testContainsService__AbstractServiceIdDesc() {
- // TODO: implement this operation test method
- // Ensure that you remove @generated or mark it @generated NOT
- fail();
- }
-
-} // ServiceSetIdDescTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.framework.TestCase; +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Service Set Id Desc</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following operations are tested: + * <ul> + * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(java.lang.Object) <em>Get Service</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(java.lang.Object) <em>Contains Service</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc) <em>Get Service</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc) <em>Contains Service</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class ServiceSetIdDescTest extends TestCase { + + /** + * The fixture for this Service Set Id Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected ServiceSetIdDesc fixture = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(ServiceSetIdDescTest.class); + } + + /** + * Constructs a new Service Set Id Desc test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public ServiceSetIdDescTest(String name) { + super(name); + } + + /** + * Sets the fixture for this Service Set Id Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void setFixture(ServiceSetIdDesc fixture) { + this.fixture = fixture; + } + + /** + * Returns the fixture for this Service Set Id Desc test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected ServiceSetIdDesc getFixture() { + return fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorswithidFactory.eINSTANCE.createServiceSetIdDesc()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + + /** + * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(java.lang.Object) <em>Get Service</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(java.lang.Object) + * @generated + */ + public void testGetService__Object() { + // TODO: implement this operation test method + // Ensure that you remove @generated or mark it @generated NOT + fail(); + } + + /** + * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(java.lang.Object) <em>Contains Service</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(java.lang.Object) + * @generated + */ + public void testContainsService__Object() { + // TODO: implement this operation test method + // Ensure that you remove @generated or mark it @generated NOT + fail(); + } + + /** + * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc) <em>Get Service</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc) + * @generated + */ + public void testGetService__AbstractServiceIdDesc() { + // TODO: implement this operation test method + // Ensure that you remove @generated or mark it @generated NOT + fail(); + } + + /** + * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc) <em>Contains Service</em>}' + * operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc) + * @generated + */ + public void testContainsService__AbstractServiceIdDesc() { + // TODO: implement this operation test method + // Ensure that you remove @generated or mark it @generated NOT + fail(); + } + +} // ServiceSetIdDescTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceSetTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceSetTest.java index d5b8aa3a263..a5f5efef27f 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceSetTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServiceSetTest.java @@ -1,162 +1,162 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.framework.TestCase;
-import junit.textui.TestRunner;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Service Set</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following operations are tested:
- * <ul>
- * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(java.lang.Object) <em>Get Service</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(java.lang.Object) <em>Contains Service</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc) <em>Get Service</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc) <em>Contains Service</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ServiceSetTest extends TestCase {
-
- /**
- * The fixture for this Service Set test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected ServiceSetIdDesc fixture = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(ServiceSetTest.class);
- }
-
- /**
- * Constructs a new Service Set test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public ServiceSetTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Service Set test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void setFixture(ServiceSetIdDesc fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Service Set test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected ServiceSetIdDesc getFixture() {
- return fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ServicedescriptorswithidFactory.eINSTANCE.createServiceSetIdDesc());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
- /**
- * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(java.lang.Object) <em>Get Service</em>}' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(java.lang.Object)
- * @generated
- */
- public void testGetService__Object() {
- // TODO: implement this operation test method
- // Ensure that you remove @generated or mark it @generated NOT
- fail();
- }
-
- /**
- * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(java.lang.Object) <em>Contains Service</em>}' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(java.lang.Object)
- * @generated
- */
- public void testContainsService__Object() {
- // TODO: implement this operation test method
- // Ensure that you remove @generated or mark it @generated NOT
- fail();
- }
-
- /**
- * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc) <em>Get Service</em>}' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc)
- * @generated
- */
- public void testGetService__AbstractServiceDesc() {
- // TODO: implement this operation test method
- // Ensure that you remove @generated or mark it @generated NOT
- fail();
- }
-
- /**
- * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc) <em>Contains Service</em>}'
- * operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc)
- * @generated
- */
- public void testContainsService__AbstractServiceDesc() {
- // TODO: implement this operation test method
- // Ensure that you remove @generated or mark it @generated NOT
- fail();
- }
-
-} // ServiceSetTest
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.framework.TestCase; +import junit.textui.TestRunner; + +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory; + +/** + * <!-- begin-user-doc --> + * A test case for the model object '<em><b>Service Set</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following operations are tested: + * <ul> + * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(java.lang.Object) <em>Get Service</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(java.lang.Object) <em>Contains Service</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc) <em>Get Service</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc) <em>Contains Service</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class ServiceSetTest extends TestCase { + + /** + * The fixture for this Service Set test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected ServiceSetIdDesc fixture = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(ServiceSetTest.class); + } + + /** + * Constructs a new Service Set test case with the given name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public ServiceSetTest(String name) { + super(name); + } + + /** + * Sets the fixture for this Service Set test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void setFixture(ServiceSetIdDesc fixture) { + this.fixture = fixture; + } + + /** + * Returns the fixture for this Service Set test case. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected ServiceSetIdDesc getFixture() { + return fixture; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(ServicedescriptorswithidFactory.eINSTANCE.createServiceSetIdDesc()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + + /** + * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(java.lang.Object) <em>Get Service</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(java.lang.Object) + * @generated + */ + public void testGetService__Object() { + // TODO: implement this operation test method + // Ensure that you remove @generated or mark it @generated NOT + fail(); + } + + /** + * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(java.lang.Object) <em>Contains Service</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(java.lang.Object) + * @generated + */ + public void testContainsService__Object() { + // TODO: implement this operation test method + // Ensure that you remove @generated or mark it @generated NOT + fail(); + } + + /** + * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc) <em>Get Service</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#getService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc) + * @generated + */ + public void testGetService__AbstractServiceDesc() { + // TODO: implement this operation test method + // Ensure that you remove @generated or mark it @generated NOT + fail(); + } + + /** + * Tests the '{@link org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc) <em>Contains Service</em>}' + * operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc#containsService(org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc) + * @generated + */ + public void testContainsService__AbstractServiceDesc() { + // TODO: implement this operation test method + // Ensure that you remove @generated or mark it @generated NOT + fail(); + } + +} // ServiceSetTest diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServicedescriptorswithidAllTests.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServicedescriptorswithidAllTests.java index cd56dd2c0bd..a7497183400 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServicedescriptorswithidAllTests.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServicedescriptorswithidAllTests.java @@ -1,50 +1,50 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
-/**
- * <!-- begin-user-doc -->
- * A test suite for the '<em><b>Servicedescriptorswithid</b></em>' model.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class ServicedescriptorswithidAllTests extends TestSuite {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(suite());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static Test suite() {
- TestSuite suite = new ServicedescriptorswithidAllTests("Servicedescriptorswithid Tests");
- suite.addTest(ServicedescriptorswithidTests.suite());
- return suite;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public ServicedescriptorswithidAllTests(String name) {
- super(name);
- }
-
-} // ServicedescriptorswithidAllTests
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.framework.Test; +import junit.framework.TestSuite; +import junit.textui.TestRunner; + +/** + * <!-- begin-user-doc --> + * A test suite for the '<em><b>Servicedescriptorswithid</b></em>' model. + * <!-- end-user-doc --> + * + * @generated + */ +public class ServicedescriptorswithidAllTests extends TestSuite { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(suite()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static Test suite() { + TestSuite suite = new ServicedescriptorswithidAllTests("Servicedescriptorswithid Tests"); + suite.addTest(ServicedescriptorswithidTests.suite()); + return suite; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public ServicedescriptorswithidAllTests(String name) { + super(name); + } + +} // ServicedescriptorswithidAllTests diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServicedescriptorswithidExample.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServicedescriptorswithidExample.java index 024bac8bb34..c723dc5f289 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServicedescriptorswithidExample.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServicedescriptorswithidExample.java @@ -1,119 +1,119 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.emf.ecore.util.Diagnostician;
-import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.RegistryIdDesc;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidPackage;
-
-/**
- * <!-- begin-user-doc -->
- * A sample utility for the '<em><b>servicedescriptorswithid</b></em>' package.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class ServicedescriptorswithidExample {
- /**
- * <!-- begin-user-doc -->
- * Load all the argument file paths or URIs as instances of the model.
- * <!-- end-user-doc -->
- *
- * @param args
- * the file paths or URIs.
- * @generated
- */
- public static void main(String[] args) {
- // Create a resource set to hold the resources.
- //
- ResourceSet resourceSet = new ResourceSetImpl();
-
- // Register the appropriate resource factory to handle all file extensions.
- //
- resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put
- (Resource.Factory.Registry.DEFAULT_EXTENSION,
- new XMIResourceFactoryImpl());
-
- // Register the package to ensure it is available during loading.
- //
- resourceSet.getPackageRegistry().put
- (ServicedescriptorswithidPackage.eNS_URI,
- ServicedescriptorswithidPackage.eINSTANCE);
-
- // If there are no arguments, emit an appropriate usage message.
- //
- if (args.length == 0) {
- System.out.println("Enter a list of file paths or URIs that have content like this:");
- try {
- Resource resource = resourceSet.createResource(URI.createURI("http:///My.servicedescriptorswithid"));
- RegistryIdDesc root = ServicedescriptorswithidFactory.eINSTANCE.createRegistryIdDesc();
- resource.getContents().add(root);
- resource.save(System.out, null);
- } catch (IOException exception) {
- exception.printStackTrace();
- }
- }
- else {
- // Iterate over all the arguments.
- //
- for (int i = 0; i < args.length; ++i) {
- // Construct the URI for the instance file.
- // The argument is treated as a file path only if it denotes an existing file.
- // Otherwise, it's directly treated as a URL.
- //
- File file = new File(args[i]);
- URI uri = file.isFile() ? URI.createFileURI(file.getAbsolutePath()) : URI.createURI(args[i]);
-
- try {
- // Demand load resource for this file.
- //
- Resource resource = resourceSet.getResource(uri, true);
- System.out.println("Loaded " + uri);
-
- // Validate the contents of the loaded resource.
- //
- for (EObject eObject : resource.getContents()) {
- Diagnostic diagnostic = Diagnostician.INSTANCE.validate(eObject);
- if (diagnostic.getSeverity() != Diagnostic.OK) {
- printDiagnostic(diagnostic, "");
- }
- }
- } catch (RuntimeException exception) {
- System.out.println("Problem loading " + uri);
- exception.printStackTrace();
- }
- }
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * Prints diagnostics with indentation.
- * <!-- end-user-doc -->
- *
- * @param diagnostic
- * the diagnostic to print.
- * @param indent
- * the indentation for printing.
- * @generated
- */
- protected static void printDiagnostic(Diagnostic diagnostic, String indent) {
- System.out.print(indent);
- System.out.println(diagnostic.getMessage());
- for (Diagnostic child : diagnostic.getChildren()) {
- printDiagnostic(child, indent + " ");
- }
- }
-
-} // ServicedescriptorswithidExample
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import java.io.File; +import java.io.IOException; + +import org.eclipse.emf.common.util.Diagnostic; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.emf.ecore.util.Diagnostician; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.RegistryIdDesc; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidFactory; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServicedescriptorswithidPackage; + +/** + * <!-- begin-user-doc --> + * A sample utility for the '<em><b>servicedescriptorswithid</b></em>' package. + * <!-- end-user-doc --> + * + * @generated + */ +public class ServicedescriptorswithidExample { + /** + * <!-- begin-user-doc --> + * Load all the argument file paths or URIs as instances of the model. + * <!-- end-user-doc --> + * + * @param args + * the file paths or URIs. + * @generated + */ + public static void main(String[] args) { + // Create a resource set to hold the resources. + // + ResourceSet resourceSet = new ResourceSetImpl(); + + // Register the appropriate resource factory to handle all file extensions. + // + resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put + (Resource.Factory.Registry.DEFAULT_EXTENSION, + new XMIResourceFactoryImpl()); + + // Register the package to ensure it is available during loading. + // + resourceSet.getPackageRegistry().put + (ServicedescriptorswithidPackage.eNS_URI, + ServicedescriptorswithidPackage.eINSTANCE); + + // If there are no arguments, emit an appropriate usage message. + // + if (args.length == 0) { + System.out.println("Enter a list of file paths or URIs that have content like this:"); + try { + Resource resource = resourceSet.createResource(URI.createURI("http:///My.servicedescriptorswithid")); + RegistryIdDesc root = ServicedescriptorswithidFactory.eINSTANCE.createRegistryIdDesc(); + resource.getContents().add(root); + resource.save(System.out, null); + } catch (IOException exception) { + exception.printStackTrace(); + } + } + else { + // Iterate over all the arguments. + // + for (int i = 0; i < args.length; ++i) { + // Construct the URI for the instance file. + // The argument is treated as a file path only if it denotes an existing file. + // Otherwise, it's directly treated as a URL. + // + File file = new File(args[i]); + URI uri = file.isFile() ? URI.createFileURI(file.getAbsolutePath()) : URI.createURI(args[i]); + + try { + // Demand load resource for this file. + // + Resource resource = resourceSet.getResource(uri, true); + System.out.println("Loaded " + uri); + + // Validate the contents of the loaded resource. + // + for (EObject eObject : resource.getContents()) { + Diagnostic diagnostic = Diagnostician.INSTANCE.validate(eObject); + if (diagnostic.getSeverity() != Diagnostic.OK) { + printDiagnostic(diagnostic, ""); + } + } + } catch (RuntimeException exception) { + System.out.println("Problem loading " + uri); + exception.printStackTrace(); + } + } + } + } + + /** + * <!-- begin-user-doc --> + * Prints diagnostics with indentation. + * <!-- end-user-doc --> + * + * @param diagnostic + * the diagnostic to print. + * @param indent + * the indentation for printing. + * @generated + */ + protected static void printDiagnostic(Diagnostic diagnostic, String indent) { + System.out.print(indent); + System.out.println(diagnostic.getMessage()); + for (Diagnostic child : diagnostic.getChildren()) { + printDiagnostic(child, indent + " "); + } + } + +} // ServicedescriptorswithidExample diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServicedescriptorswithidTests.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServicedescriptorswithidTests.java index 0cdc5505740..d97c13f1a2d 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServicedescriptorswithidTests.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/src/org/eclipse/papyrus/infra/core/serviceregistry/servicedescriptorswithid/tests/ServicedescriptorswithidTests.java @@ -1,50 +1,50 @@ -/**
- */
-package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
-/**
- * <!-- begin-user-doc -->
- * A test suite for the '<em><b>servicedescriptorswithid</b></em>' package.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class ServicedescriptorswithidTests extends TestSuite {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(suite());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public static Test suite() {
- TestSuite suite = new ServicedescriptorswithidTests("servicedescriptorswithid Tests");
- suite.addTestSuite(ServiceSetIdDescTest.class);
- return suite;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public ServicedescriptorswithidTests(String name) {
- super(name);
- }
-
-} // ServicedescriptorswithidTests
+/** + */ +package org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.tests; + +import junit.framework.Test; +import junit.framework.TestSuite; +import junit.textui.TestRunner; + +/** + * <!-- begin-user-doc --> + * A test suite for the '<em><b>servicedescriptorswithid</b></em>' package. + * <!-- end-user-doc --> + * + * @generated + */ +public class ServicedescriptorswithidTests extends TestSuite { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(suite()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static Test suite() { + TestSuite suite = new ServicedescriptorswithidTests("servicedescriptorswithid Tests"); + suite.addTestSuite(ServiceSetIdDescTest.class); + return suite; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public ServicedescriptorswithidTests(String name) { + super(name); + } + +} // ServicedescriptorswithidTests diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/AbstractServiceDescriptorsWithIdProviderTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/AbstractServiceDescriptorsWithIdProviderTest.java index 0012b42198e..c98af6dee08 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/AbstractServiceDescriptorsWithIdProviderTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/AbstractServiceDescriptorsWithIdProviderTest.java @@ -1,204 +1,204 @@ -/*****************************************************************************
- * Copyright (c) 2012 Cedric Dumoulin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.core.serviceregistry;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AliasIdDesc;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.RegistryIdDesc;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc;
-import org.junit.Test;
-
-
-/**
- * @author cedric dumoulin
- *
- */
-public abstract class AbstractServiceDescriptorsWithIdProviderTest {
-
- static final String PLUGIN_XML = "resources/plugin.xml";
-
- /**
- * Load a RegistryDesc from the specified declaration file.
- *
- * @param extensionFileName
- * The name of the resource containing declarations
- * @param registryName
- * The name of the registry to load.
- * @return The descriptor for the registry.
- *
- * @throws IOException
- * @throws ServiceException
- * @throws DeclarationException
- */
- abstract public RegistryIdDesc getRegistryDesc(String extensionFileName, String registryName) throws IOException, ServiceException, DeclarationException;
-
- /**
- * Load a ServiceSetDesc from the specified declaration file.
- *
- * @param extensionFileName
- * The name of the resource containing declarations
- * @param serviceSetName
- * The name of the serviceSet to load.
- * @return The descriptor for the ServiceSet
- * @throws IOException
- * @throws ServiceException
- * @throws DeclarationException
- */
- abstract public ServiceSetIdDesc getServiceSetDesc(String extensionFileName, String serviceSetName) throws IOException, ServiceException, DeclarationException;
-
- /**
- * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ExtensionServiceDescriptorsWithIdProvider#getRegistryDescriptor(java.lang.String)}.
- *
- * @throws IOException
- * @throws ServiceException
- * @throws DeclarationException
- */
- @Test
- public void testGetRegistryDescriptor() throws IOException, ServiceException, DeclarationException {
-
- String readFromFile = "resources/plugin.xml";
- RegistryIdDesc registryIdDesc = getRegistryDesc(readFromFile, "registryA");
- assertNotNull("Get registered registry", registryIdDesc);
-
- assertTrue("extends found", registryIdDesc.getExtends().size() > 0);
- assertTrue("extends found", registryIdDesc.getExtends().contains("registryB"));
-
- assertTrue("extends found", registryIdDesc.getParents().size() > 0);
- assertTrue("extends found", registryIdDesc.getParents().contains("registryC"));
-
- assertTrue("extends found", registryIdDesc.getSets().size() > 0);
- assertTrue("extends found", registryIdDesc.getSets().contains("servicesSetA"));
-
- }
-
- /**
- * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ExtensionServiceDescriptorsWithIdProvider#getServiceSet(java.lang.String)}.
- *
- * @throws IOException
- * @throws ServiceException
- * @throws DeclarationException
- */
- @Test
- public void testGetServiceSet() throws IOException, ServiceException, DeclarationException {
- // create provider, reading description from specified file.
- IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml");
-
- ExtensionServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry);
-
- // Tests
- assertNotNull("provider created", declarationsProvider);
- ServiceSetIdDesc serviceSet = declarationsProvider.getServiceSet("fragmentA");
-
- assertNotNull("Fragment exist", serviceSet);
-
- assertTrue("extends set", serviceSet.getExtends().size() > 0);
- assertTrue("extends set", serviceSet.getExtends().contains("fragmentB"));
-
- }
-
- /**
- * Test correctness of set parsing
- *
- * @throws IOException
- * @throws ServiceException
- * @throws DeclarationException
- */
- @Test
- public void testSetParsing() throws IOException, ServiceException, DeclarationException {
- String serviceSetName = "extendingSet";
- ServiceSetIdDesc serviceSet = getServiceSetDesc(PLUGIN_XML, serviceSetName);
-
- // Tests
- assertNotNull("service found", serviceSet);
-
- assertTrue("extends set", serviceSet.getExtends().size() > 0);
- assertTrue("extends set", serviceSet.getExtends().contains("setWithC"));
-
- String serviceAId = FakeServiceA.class.getName();
- String serviceBId = FakeServiceB.class.getName();
- assertTrue("service added", serviceSet.getServiceDescriptors().size() > 0);
- assertNotNull("service added", serviceSet.getService(serviceAId));
- assertNotNull("service added", serviceSet.getService(serviceBId));
-
- }
-
- /**
- * Test correctness of service parsing
- *
- * @throws IOException
- * @throws ServiceException
- * @throws DeclarationException
- */
- @Test
- public void testServiceParsing() throws IOException, ServiceException, DeclarationException {
- // Indirectly read a specified service: first the set, second the service
- String serviceSetName = "dependantServices";
- String serviceAId = FakeServiceA.class.getName();
- String serviceBId = FakeServiceB.class.getName();
- String serviceCId = FakeServiceC.class.getName();
-
- ServiceSetIdDesc serviceSet = getServiceSetDesc(PLUGIN_XML, serviceSetName);
-
- AbstractServiceIdDesc serviceADesc = serviceSet.getService(serviceAId);
- AbstractServiceIdDesc serviceBDesc = serviceSet.getService(serviceBId);
- AbstractServiceIdDesc serviceCDesc = serviceSet.getService(serviceCId);
-
- // Tests
- assertNotNull("service found", serviceADesc);
- assertNotNull("service found", serviceBDesc);
- assertNotNull("service found", serviceCDesc);
- // Check dependsOn
- assertTrue("dependsOn set", serviceADesc.getDependsOn().contains(serviceBId));
- assertTrue("dependsOn set", serviceBDesc.getDependsOn().contains(serviceCId));
- }
-
- /**
- * Check if a serviceSet declared in several fragments with the same name is correctly loaded.
- *
- * @throws IOException
- * @throws ServiceException
- * @throws DeclarationException
- * @throws ServiceException
- */
- @Test
- public void testLoadAlias() throws IOException, DeclarationException, ServiceException {
-
- // Check if specified service are in the registry
- String serviceSetName = "setWithAlias";
- ServiceSetIdDesc serviceSet = getServiceSetDesc(PLUGIN_XML, serviceSetName);
-
- String serviceAId = FakeServiceA.class.getName();
- String aliasServiceId = "AnAlias";
- AbstractServiceIdDesc serviceADesc = serviceSet.getService(serviceAId);
- AbstractServiceIdDesc abstractAliasDesc = serviceSet.getService(aliasServiceId);
-
- assertNotNull("service found", serviceADesc);
- assertNotNull("service found", abstractAliasDesc);
- assertTrue("right type", abstractAliasDesc instanceof AliasIdDesc);
-
- AliasIdDesc aliasIdDesc = (AliasIdDesc) abstractAliasDesc;
- assertEquals("alias set", serviceAId, aliasIdDesc.getAliasedService());
- // assertTrue("alaised service added in dependencies", aliasDesc.getDependsOn().contains(serviceAId));
- }
-
-
-}
+/***************************************************************************** + * Copyright (c) 2012 Cedric Dumoulin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.core.serviceregistry; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.io.IOException; + +import org.eclipse.core.runtime.IExtensionRegistry; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AbstractServiceIdDesc; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.AliasIdDesc; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.RegistryIdDesc; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc; +import org.junit.Test; + + +/** + * @author cedric dumoulin + * + */ +public abstract class AbstractServiceDescriptorsWithIdProviderTest { + + static final String PLUGIN_XML = "resources/plugin.xml"; + + /** + * Load a RegistryDesc from the specified declaration file. + * + * @param extensionFileName + * The name of the resource containing declarations + * @param registryName + * The name of the registry to load. + * @return The descriptor for the registry. + * + * @throws IOException + * @throws ServiceException + * @throws DeclarationException + */ + abstract public RegistryIdDesc getRegistryDesc(String extensionFileName, String registryName) throws IOException, ServiceException, DeclarationException; + + /** + * Load a ServiceSetDesc from the specified declaration file. + * + * @param extensionFileName + * The name of the resource containing declarations + * @param serviceSetName + * The name of the serviceSet to load. + * @return The descriptor for the ServiceSet + * @throws IOException + * @throws ServiceException + * @throws DeclarationException + */ + abstract public ServiceSetIdDesc getServiceSetDesc(String extensionFileName, String serviceSetName) throws IOException, ServiceException, DeclarationException; + + /** + * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ExtensionServiceDescriptorsWithIdProvider#getRegistryDescriptor(java.lang.String)}. + * + * @throws IOException + * @throws ServiceException + * @throws DeclarationException + */ + @Test + public void testGetRegistryDescriptor() throws IOException, ServiceException, DeclarationException { + + String readFromFile = "resources/plugin.xml"; + RegistryIdDesc registryIdDesc = getRegistryDesc(readFromFile, "registryA"); + assertNotNull("Get registered registry", registryIdDesc); + + assertTrue("extends found", registryIdDesc.getExtends().size() > 0); + assertTrue("extends found", registryIdDesc.getExtends().contains("registryB")); + + assertTrue("extends found", registryIdDesc.getParents().size() > 0); + assertTrue("extends found", registryIdDesc.getParents().contains("registryC")); + + assertTrue("extends found", registryIdDesc.getSets().size() > 0); + assertTrue("extends found", registryIdDesc.getSets().contains("servicesSetA")); + + } + + /** + * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ExtensionServiceDescriptorsWithIdProvider#getServiceSet(java.lang.String)}. + * + * @throws IOException + * @throws ServiceException + * @throws DeclarationException + */ + @Test + public void testGetServiceSet() throws IOException, ServiceException, DeclarationException { + // create provider, reading description from specified file. + IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml"); + + ExtensionServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry); + + // Tests + assertNotNull("provider created", declarationsProvider); + ServiceSetIdDesc serviceSet = declarationsProvider.getServiceSet("fragmentA"); + + assertNotNull("Fragment exist", serviceSet); + + assertTrue("extends set", serviceSet.getExtends().size() > 0); + assertTrue("extends set", serviceSet.getExtends().contains("fragmentB")); + + } + + /** + * Test correctness of set parsing + * + * @throws IOException + * @throws ServiceException + * @throws DeclarationException + */ + @Test + public void testSetParsing() throws IOException, ServiceException, DeclarationException { + String serviceSetName = "extendingSet"; + ServiceSetIdDesc serviceSet = getServiceSetDesc(PLUGIN_XML, serviceSetName); + + // Tests + assertNotNull("service found", serviceSet); + + assertTrue("extends set", serviceSet.getExtends().size() > 0); + assertTrue("extends set", serviceSet.getExtends().contains("setWithC")); + + String serviceAId = FakeServiceA.class.getName(); + String serviceBId = FakeServiceB.class.getName(); + assertTrue("service added", serviceSet.getServiceDescriptors().size() > 0); + assertNotNull("service added", serviceSet.getService(serviceAId)); + assertNotNull("service added", serviceSet.getService(serviceBId)); + + } + + /** + * Test correctness of service parsing + * + * @throws IOException + * @throws ServiceException + * @throws DeclarationException + */ + @Test + public void testServiceParsing() throws IOException, ServiceException, DeclarationException { + // Indirectly read a specified service: first the set, second the service + String serviceSetName = "dependantServices"; + String serviceAId = FakeServiceA.class.getName(); + String serviceBId = FakeServiceB.class.getName(); + String serviceCId = FakeServiceC.class.getName(); + + ServiceSetIdDesc serviceSet = getServiceSetDesc(PLUGIN_XML, serviceSetName); + + AbstractServiceIdDesc serviceADesc = serviceSet.getService(serviceAId); + AbstractServiceIdDesc serviceBDesc = serviceSet.getService(serviceBId); + AbstractServiceIdDesc serviceCDesc = serviceSet.getService(serviceCId); + + // Tests + assertNotNull("service found", serviceADesc); + assertNotNull("service found", serviceBDesc); + assertNotNull("service found", serviceCDesc); + // Check dependsOn + assertTrue("dependsOn set", serviceADesc.getDependsOn().contains(serviceBId)); + assertTrue("dependsOn set", serviceBDesc.getDependsOn().contains(serviceCId)); + } + + /** + * Check if a serviceSet declared in several fragments with the same name is correctly loaded. + * + * @throws IOException + * @throws ServiceException + * @throws DeclarationException + * @throws ServiceException + */ + @Test + public void testLoadAlias() throws IOException, DeclarationException, ServiceException { + + // Check if specified service are in the registry + String serviceSetName = "setWithAlias"; + ServiceSetIdDesc serviceSet = getServiceSetDesc(PLUGIN_XML, serviceSetName); + + String serviceAId = FakeServiceA.class.getName(); + String aliasServiceId = "AnAlias"; + AbstractServiceIdDesc serviceADesc = serviceSet.getService(serviceAId); + AbstractServiceIdDesc abstractAliasDesc = serviceSet.getService(aliasServiceId); + + assertNotNull("service found", serviceADesc); + assertNotNull("service found", abstractAliasDesc); + assertTrue("right type", abstractAliasDesc instanceof AliasIdDesc); + + AliasIdDesc aliasIdDesc = (AliasIdDesc) abstractAliasDesc; + assertEquals("alias set", serviceAId, aliasIdDesc.getAliasedService()); + // assertTrue("alaised service added in dependencies", aliasDesc.getDependsOn().contains(serviceAId)); + } + + +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/AllTests.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/AllTests.java index c6638fcfe7b..3d2e92a18a6 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/AllTests.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/AllTests.java @@ -1,31 +1,31 @@ -/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.core.serviceregistry;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-
-
-
-@RunWith(Suite.class)
-@SuiteClasses({
- // {oep}.core.services
- ServicesRegistryTest.class
-
-})
-/**
- * Suite Class for all tests in the plugin
- */
-public class AllTests {
-
-}
+/***************************************************************************** + * Copyright (c) 2010 CEA LIST. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.infra.core.serviceregistry; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + + + +@RunWith(Suite.class) +@SuiteClasses({ + // {oep}.core.services + ServicesRegistryTest.class + +}) +/** + * Suite Class for all tests in the plugin + */ +public class AllTests { + +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/AnnotatedClass.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/AnnotatedClass.java index bdb1c051340..c7daf4e0cd3 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/AnnotatedClass.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/AnnotatedClass.java @@ -1,29 +1,29 @@ -/*****************************************************************************
- * Copyright (c) 2012 Cedric Dumoulin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.core.serviceregistry;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.annotations.Service;
-
-
-/**
- * @author cedric dumoulin
- *
- */
-
-@Service
-public class AnnotatedClass {
-
-
-}
+/***************************************************************************** + * Copyright (c) 2012 Cedric Dumoulin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.core.serviceregistry; + +import org.eclipse.papyrus.infra.core.serviceregistry.annotations.Service; + + +/** + * @author cedric dumoulin + * + */ + +@Service +public class AnnotatedClass { + + +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/EclipseExtensionUtils.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/EclipseExtensionUtils.java index cf6644a11f5..8398976a241 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/EclipseExtensionUtils.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/EclipseExtensionUtils.java @@ -1,129 +1,129 @@ -/*****************************************************************************
- * Copyright (c) 2012 Cedric Dumoulin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.core.serviceregistry;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.RegistryFactory;
-import org.eclipse.core.runtime.spi.RegistryContributor;
-
-
-/**
- * Set of utilities helping to load eclipse extensions from predefined files.
- *
- * @author cedric dumoulin
- *
- * TODO This class is dedicated to the servicesREgistry.tests plugin. Can we make it more generic ?
- *
- */
-public class EclipseExtensionUtils {
-
- /**
- * Unique instance.
- */
- static final EclipseExtensionUtils instance = new EclipseExtensionUtils();
-
- /**
- * Create a new {@link IExtensionRegistry} and initialize it with the plugin.xml file found in the specified directory.
- * Also add required plugin.xml files
- *
- * @param localfilepath
- * @return
- * @throws IOException
- */
- public IExtensionRegistry createRegistry(String localfilepath) throws IOException {
-
- // Create the registry
- IExtensionRegistry registry = RegistryFactory.createRegistry(null, this, this);
-
- // Load specified file
- loadTestExtensionFile(registry, localfilepath);
- // load regular plugin.xml in order to have the extension point definition
- loadExtensionFile(registry, "org.eclipse.papyrus.infra.core.serviceregistry", "plugin.xml");
- return registry;
- }
-
- /**
- * Load the specified file (extension and extension points) into the registry.
- * The file is located in the specified plugin.
- *
- * @param localfilepath
- * @return
- * @throws IOException
- */
- protected void loadExtensionFile(IExtensionRegistry registry, String pluginID, String localfilepath) throws IOException {
-
- InputStream inputStream;
-
- if (Platform.isRunning()) {
- // Load the specified plugin.xml file
- URL url = new URL("platform:/plugin/" + pluginID + "/" + localfilepath);
-
- // URL url = new URL("platform", PLUGIN_ID, localfilepath );
- inputStream = url.openConnection().getInputStream();
- }
- else {
- // try to read locally
- // System.out.println("platform not running !!");
-
- URL url = new URL("file:" + "../" + pluginID + "/" + localfilepath);
- // URL url = new URL("platform", PLUGIN_ID, localfilepath );
- inputStream = url.openConnection().getInputStream();
- }
-
- // Create a point contributor with fake ID
- RegistryContributor pointContributor = new RegistryContributor(pluginID, pluginID, null, null);
-
- registry.addContribution(inputStream, pointContributor, false, null, null, this);
- }
-
- /**
- * Load the specified file (containing extension declarations) into the provided registry.
- * The file is located in the same plugin as this class.
- *
- * @param localfilepath
- * @return
- * @throws IOException
- */
- public void loadTestExtensionFile(IExtensionRegistry registry, String localfilepath) throws IOException {
-
- String PLUGIN_ID = "org.eclipse.papyrus.infra.core.serviceregistry.test";
- InputStream inputStream;
-
- if (Platform.isRunning()) {
- // Load the specified plugin.xml file
- URL url = new URL("platform:/plugin/" + PLUGIN_ID + "/" + localfilepath);
-
- // URL url = new URL("platform", PLUGIN_ID, localfilepath );
- inputStream = url.openConnection().getInputStream();
- }
- else {
- // try to read locally
- // System.out.println("platform not running !!");
- URL url = new URL("file:" + localfilepath);
- // URL url = new URL("platform", PLUGIN_ID, localfilepath );
- inputStream = url.openConnection().getInputStream();
- }
-
- // Create a point contributor with fake ID
- RegistryContributor pointContributor = new RegistryContributor(PLUGIN_ID, PLUGIN_ID, null, null);
- registry.addContribution(inputStream, pointContributor, false, null, null, this);
- }
-
-}
+/***************************************************************************** + * Copyright (c) 2012 Cedric Dumoulin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.core.serviceregistry; + +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; + +import org.eclipse.core.runtime.IExtensionRegistry; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.RegistryFactory; +import org.eclipse.core.runtime.spi.RegistryContributor; + + +/** + * Set of utilities helping to load eclipse extensions from predefined files. + * + * @author cedric dumoulin + * + * TODO This class is dedicated to the servicesREgistry.tests plugin. Can we make it more generic ? + * + */ +public class EclipseExtensionUtils { + + /** + * Unique instance. + */ + static final EclipseExtensionUtils instance = new EclipseExtensionUtils(); + + /** + * Create a new {@link IExtensionRegistry} and initialize it with the plugin.xml file found in the specified directory. + * Also add required plugin.xml files + * + * @param localfilepath + * @return + * @throws IOException + */ + public IExtensionRegistry createRegistry(String localfilepath) throws IOException { + + // Create the registry + IExtensionRegistry registry = RegistryFactory.createRegistry(null, this, this); + + // Load specified file + loadTestExtensionFile(registry, localfilepath); + // load regular plugin.xml in order to have the extension point definition + loadExtensionFile(registry, "org.eclipse.papyrus.infra.core.serviceregistry", "plugin.xml"); + return registry; + } + + /** + * Load the specified file (extension and extension points) into the registry. + * The file is located in the specified plugin. + * + * @param localfilepath + * @return + * @throws IOException + */ + protected void loadExtensionFile(IExtensionRegistry registry, String pluginID, String localfilepath) throws IOException { + + InputStream inputStream; + + if (Platform.isRunning()) { + // Load the specified plugin.xml file + URL url = new URL("platform:/plugin/" + pluginID + "/" + localfilepath); + + // URL url = new URL("platform", PLUGIN_ID, localfilepath ); + inputStream = url.openConnection().getInputStream(); + } + else { + // try to read locally + // System.out.println("platform not running !!"); + + URL url = new URL("file:" + "../" + pluginID + "/" + localfilepath); + // URL url = new URL("platform", PLUGIN_ID, localfilepath ); + inputStream = url.openConnection().getInputStream(); + } + + // Create a point contributor with fake ID + RegistryContributor pointContributor = new RegistryContributor(pluginID, pluginID, null, null); + + registry.addContribution(inputStream, pointContributor, false, null, null, this); + } + + /** + * Load the specified file (containing extension declarations) into the provided registry. + * The file is located in the same plugin as this class. + * + * @param localfilepath + * @return + * @throws IOException + */ + public void loadTestExtensionFile(IExtensionRegistry registry, String localfilepath) throws IOException { + + String PLUGIN_ID = "org.eclipse.papyrus.infra.core.serviceregistry.test"; + InputStream inputStream; + + if (Platform.isRunning()) { + // Load the specified plugin.xml file + URL url = new URL("platform:/plugin/" + PLUGIN_ID + "/" + localfilepath); + + // URL url = new URL("platform", PLUGIN_ID, localfilepath ); + inputStream = url.openConnection().getInputStream(); + } + else { + // try to read locally + // System.out.println("platform not running !!"); + URL url = new URL("file:" + localfilepath); + // URL url = new URL("platform", PLUGIN_ID, localfilepath ); + inputStream = url.openConnection().getInputStream(); + } + + // Create a point contributor with fake ID + RegistryContributor pointContributor = new RegistryContributor(PLUGIN_ID, PLUGIN_ID, null, null); + registry.addContribution(inputStream, pointContributor, false, null, null, this); + } + +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ExtensionServiceDescriptorsWithIdProviderFromFile.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ExtensionServiceDescriptorsWithIdProviderFromFile.java index c5d2188017a..1d33206dd11 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ExtensionServiceDescriptorsWithIdProviderFromFile.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ExtensionServiceDescriptorsWithIdProviderFromFile.java @@ -1,48 +1,48 @@ -/*****************************************************************************
- * Copyright (c) 2012 Cedric Dumoulin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.core.serviceregistry;
-
-import org.eclipse.core.runtime.IExtensionRegistry;
-
-
-/**
- * @author dumoulin
- *
- */
-public class ExtensionServiceDescriptorsWithIdProviderFromFile extends ExtensionServiceDescriptorsWithIdProvider {
-
- protected IExtensionRegistry extensionRegistry;
-
- /**
- *
- * Constructor.
- *
- * @param extensionRegistry
- * @throws ServiceException
- */
- public ExtensionServiceDescriptorsWithIdProviderFromFile(IExtensionRegistry extensionRegistry) throws ServiceException {
- super();
- this.extensionRegistry = extensionRegistry;
- }
-
- /**
- *
- * @return
- */
- @Override
- protected IExtensionRegistry getExtensionRegistry() {
- return extensionRegistry;
- }
-}
+/***************************************************************************** + * Copyright (c) 2012 Cedric Dumoulin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.core.serviceregistry; + +import org.eclipse.core.runtime.IExtensionRegistry; + + +/** + * @author dumoulin + * + */ +public class ExtensionServiceDescriptorsWithIdProviderFromFile extends ExtensionServiceDescriptorsWithIdProvider { + + protected IExtensionRegistry extensionRegistry; + + /** + * + * Constructor. + * + * @param extensionRegistry + * @throws ServiceException + */ + public ExtensionServiceDescriptorsWithIdProviderFromFile(IExtensionRegistry extensionRegistry) throws ServiceException { + super(); + this.extensionRegistry = extensionRegistry; + } + + /** + * + * @return + */ + @Override + protected IExtensionRegistry getExtensionRegistry() { + return extensionRegistry; + } +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ExtensionServiceDescriptorsWithIdProviderIntegrationTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ExtensionServiceDescriptorsWithIdProviderIntegrationTest.java index 8394f6f23f9..2c00be46bd7 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ExtensionServiceDescriptorsWithIdProviderIntegrationTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ExtensionServiceDescriptorsWithIdProviderIntegrationTest.java @@ -1,311 +1,311 @@ -/*****************************************************************************
- * Copyright (c) 2012 Cedric Dumoulin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.core.serviceregistry;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-
-/**
- * @author cedric dumoulin
- *
- */
-public class ExtensionServiceDescriptorsWithIdProviderIntegrationTest {
-
- /**
- * @throws java.lang.Exception
- */
- @Before
- public void setUp() throws Exception {
- }
-
- /**
- * @throws java.lang.Exception
- */
- @After
- public void tearDown() throws Exception {
- }
-
- /**
- * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.internal.ServicesRegistryConfigurationReaderFromExtensions#loadServicesRegistryConfiguration(org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry, java.lang.String)}.
- *
- * @throws IOException
- * @throws ServiceException
- * @throws DeclarationException
- */
- @Test
- public void testLoadServicesSetConfiguration() throws IOException, ServiceException, DeclarationException {
-
- // Create a declaration provider, and a factory
- IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml");
- IServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry);
- ServiceRegistryFactory factory = new ServiceRegistryFactory(declarationsProvider);
- // Create ServiceRegistry from factory
- ServicesRegistry registry = factory.getServicesRegistry("simpleTestRegistry");
-
- // String servicesSetName = "simpleTest";
-
- // Check if specified service are in the registry
- Class<?> serviceA = FakeServiceA.class;
- Class<?> serviceC = FakeServiceC.class;
-
- assertNotNull("service registered", registry.serviceState(serviceA));
- assertSame("service registered", ServiceState.registered, registry.serviceState(serviceA));
- assertSame("service registered", ServiceState.registered, registry.serviceState(serviceC));
-
- registry.startNewServices();
- assertNotNull("service found", registry.getService(serviceA));
- assertNotNull("service found", registry.getService(serviceC));
-
- registry.disposeRegistry(true);
- }
-
- /**
- * Test a set extending another set.
- * * @throws IOException
- *
- * @throws ServiceException
- * @throws DeclarationException
- */
- @Test
- public void testLoadServicesSetWithExtends() throws IOException, ServiceException, DeclarationException {
-
- // Create a declaration provider, and a factory
- IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml");
- IServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry);
- ServiceRegistryFactory factory = new ServiceRegistryFactory(declarationsProvider);
- // Create ServiceRegistry from factory
- ServicesRegistry registry = factory.getServicesRegistry("extendingSetRegistry");
-
- // Create a ServiceRegistry
- // String servicesSetName = "extendingSet";
-
- // set(A, B) --> set(C)
-
- // Check if specified service are in the registry
- // C should be in the registry
- Class<?> serviceA = FakeServiceA.class;
- Class<?> serviceB = FakeServiceB.class;
- Class<?> serviceC = FakeServiceC.class;
-
- assertNotNull("service registered", registry.serviceState(serviceA));
- assertSame("service registered", ServiceState.registered, registry.serviceState(serviceA));
- assertSame("service registered", ServiceState.registered, registry.serviceState(serviceB));
- assertSame("service registered", ServiceState.registered, registry.serviceState(serviceC));
-
- registry.startNewServices();
- assertNotNull("service found", registry.getService(serviceA));
- assertNotNull("service found", registry.getService(serviceC));
-
- registry.disposeRegistry(true);
- }
-
- /**
- * Test a set extending another set.
- * * @throws IOException
- *
- * @throws ServiceException
- * @throws DeclarationException
- */
- @Test
- public void testBadDeclaration() throws IOException, ServiceException, DeclarationException {
- // Create a declaration provider, and a factory
- IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml");
- IServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry);
- ServiceRegistryFactory factory = new ServiceRegistryFactory(declarationsProvider);
- // Create ServiceRegistry from factory
-
- // Create a ServiceRegistry
- ServicesRegistry registry;
- // String servicesSetName = "badSetExtendsIdMissing";
- try {
- registry = factory.getServicesRegistry("badSetExtendsIdMissingRegistry");
- registry.startNewServices();
- fail("Exception should be thrown");
- } catch (DeclarationException e) {
- // e.printStackTrace();
- }
-
- }
-
- /**
- * Test a set extending another set.
- * * @throws IOException
- *
- * @throws ServiceException
- * @throws DeclarationException
- */
- @Test
- public void testMissingBadServiceSetName() throws IOException, ServiceException, DeclarationException {
- // Create a declaration provider, and a factory
- IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml");
- IServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry);
- ServiceRegistryFactory factory = new ServiceRegistryFactory(declarationsProvider);
-
- // Create a ServiceRegistry
- ServicesRegistry registry;
- // String servicesSetName = "NonExistingName";
- try {
- // Create ServiceRegistry from factory
- registry = factory.getServicesRegistry("NonExistingName");
- registry.startNewServices();
- fail("Exception should be thrown");
- } catch (DeclarationException e) {
- // e.printStackTrace();
- }
-
- }
-
- /**
- * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.internal.ServicesRegistryConfigurationReaderFromExtensions#loadServicesRegistryConfiguration(org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry, java.lang.String)}.
- *
- * @throws IOException
- * @throws ServiceException
- * @throws DeclarationException
- */
- @Test
- public void testServicesWithExtends() throws IOException, ServiceException, DeclarationException {
-
- // Create a declaration provider, and a factory
- IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml");
- IServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry);
- ServiceRegistryFactory factory = new ServiceRegistryFactory(declarationsProvider);
- // Create ServiceRegistry from factory
- ServicesRegistry registry = factory.getServicesRegistry("dependantServicesRegistry");
-
- // String servicesSetName = "dependantServices";
- FakeService.getTrace().reset();
- registry.startNewServices();
-
-
- // check services
- Class<?> serviceA = FakeServiceA.class;
- Class<?> serviceB = FakeServiceB.class;
- Class<?> serviceC = FakeServiceC.class;
- // A and C should be started, B should not be started.
- assertTrue("A started", registry.isStarted(serviceA));
- assertFalse("B not started", registry.isStarted(serviceB));
- assertTrue("C started", registry.isStarted(serviceC));
-
- // Check if we can get them
- assertNotNull("got service started", registry.getService(serviceC));
- assertNotNull("got service started", registry.getService(serviceA));
-
- // check creation order (C then A)
- // order should be C, A
- TestTrace trace = FakeService.getTrace();
- int i = 0;
- assertEquals("order", serviceC.getSimpleName() + ",create", trace.getNameTrace(i++));
- assertEquals("order", serviceA.getSimpleName() + ",create", trace.getNameTrace(i++));
-
- assertEquals("order", serviceC.getSimpleName() + ",init", trace.getNameTrace(i++));
- assertEquals("order", serviceA.getSimpleName() + ",init", trace.getNameTrace(i++));
-
- assertEquals("order", serviceC.getSimpleName() + ",start", trace.getNameTrace(i++));
- assertEquals("order", serviceA.getSimpleName() + ",start", trace.getNameTrace(i++));
-
- // start B
- assertNotNull("got service started", registry.getService(serviceB));
- assertTrue("B started", registry.isStarted(serviceB));
-
- registry.disposeRegistry(true);
- }
-
-
-
- /**
- * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.internal.ServicesRegistryConfigurationReaderFromExtensions#loadServicesSetConfiguration(org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry, java.lang.String)}.
- */
- @Test
- public void testLoadServicesRegistryConfiguration() {
- fail("Not yet implemented");
- }
-
- /**
- * Check if a serviceSet declared in several fragments with the same name is correctly loaded.
- *
- * @throws IOException
- * @throws ServiceException
- * @throws DeclarationException
- */
- @Test
- public void testLoadServicesSetFromPartialFragments() throws IOException, ServiceException, DeclarationException {
-
- // Create a declaration provider, and a factory
- IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml");
- IServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry);
- ServiceRegistryFactory factory = new ServiceRegistryFactory(declarationsProvider);
- // Create ServiceRegistry from factory
- ServicesRegistry registry = factory.getServicesRegistry("doubleNameRegistry");
-
- // Create a ServiceRegistry
- // String servicesSetName = "doubleName";
-
- // Check if specified service are in the registry
- Class<?> serviceA = FakeServiceA.class;
- Class<?> serviceB = FakeServiceB.class;
-
- assertNotNull("service registered", registry.serviceState(serviceA));
- assertSame("service registered", ServiceState.registered, registry.serviceState(serviceA));
- assertSame("service registered", ServiceState.registered, registry.serviceState(serviceB));
-
- registry.startNewServices();
- assertNotNull("service found", registry.getService(serviceA));
- assertNotNull("service found", registry.getService(serviceB));
-
- registry.disposeRegistry(true);
- }
-
- /**
- * Check if a serviceSet declared in several fragments with the same name is correctly loaded.
- *
- * @throws IOException
- * @throws ServiceException
- * @throws DeclarationException
- * @throws ServiceException
- */
- @Test
- public void testLoadAlias() throws IOException, DeclarationException, ServiceException {
-
- // Create a declaration provider, and a factory
- IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml");
- IServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry);
- ServiceRegistryFactory factory = new ServiceRegistryFactory(declarationsProvider);
- // Create ServiceRegistry from factory
- ServicesRegistry registry = factory.getServicesRegistry("setWithAliasRegistry");
- registry.startNewServices();
-
- // Check if specified service are in the registry
- Class<?> serviceA = FakeServiceA.class;
- String aliasService = "AnAlias";
- assertNotNull("service found", registry.getService(serviceA));
- assertNotNull("service found", registry.getService(aliasService));
- assertSame("same service", registry.getService(serviceA), registry.getService(aliasService));
- registry.disposeRegistry(true);
- }
-
-
-}
+/***************************************************************************** + * Copyright (c) 2012 Cedric Dumoulin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.core.serviceregistry; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertSame; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import java.io.IOException; + +import org.eclipse.core.runtime.IExtensionRegistry; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + + +/** + * @author cedric dumoulin + * + */ +public class ExtensionServiceDescriptorsWithIdProviderIntegrationTest { + + /** + * @throws java.lang.Exception + */ + @Before + public void setUp() throws Exception { + } + + /** + * @throws java.lang.Exception + */ + @After + public void tearDown() throws Exception { + } + + /** + * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.internal.ServicesRegistryConfigurationReaderFromExtensions#loadServicesRegistryConfiguration(org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry, java.lang.String)}. + * + * @throws IOException + * @throws ServiceException + * @throws DeclarationException + */ + @Test + public void testLoadServicesSetConfiguration() throws IOException, ServiceException, DeclarationException { + + // Create a declaration provider, and a factory + IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml"); + IServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry); + ServiceRegistryFactory factory = new ServiceRegistryFactory(declarationsProvider); + // Create ServiceRegistry from factory + ServicesRegistry registry = factory.getServicesRegistry("simpleTestRegistry"); + + // String servicesSetName = "simpleTest"; + + // Check if specified service are in the registry + Class<?> serviceA = FakeServiceA.class; + Class<?> serviceC = FakeServiceC.class; + + assertNotNull("service registered", registry.serviceState(serviceA)); + assertSame("service registered", ServiceState.registered, registry.serviceState(serviceA)); + assertSame("service registered", ServiceState.registered, registry.serviceState(serviceC)); + + registry.startNewServices(); + assertNotNull("service found", registry.getService(serviceA)); + assertNotNull("service found", registry.getService(serviceC)); + + registry.disposeRegistry(true); + } + + /** + * Test a set extending another set. + * * @throws IOException + * + * @throws ServiceException + * @throws DeclarationException + */ + @Test + public void testLoadServicesSetWithExtends() throws IOException, ServiceException, DeclarationException { + + // Create a declaration provider, and a factory + IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml"); + IServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry); + ServiceRegistryFactory factory = new ServiceRegistryFactory(declarationsProvider); + // Create ServiceRegistry from factory + ServicesRegistry registry = factory.getServicesRegistry("extendingSetRegistry"); + + // Create a ServiceRegistry + // String servicesSetName = "extendingSet"; + + // set(A, B) --> set(C) + + // Check if specified service are in the registry + // C should be in the registry + Class<?> serviceA = FakeServiceA.class; + Class<?> serviceB = FakeServiceB.class; + Class<?> serviceC = FakeServiceC.class; + + assertNotNull("service registered", registry.serviceState(serviceA)); + assertSame("service registered", ServiceState.registered, registry.serviceState(serviceA)); + assertSame("service registered", ServiceState.registered, registry.serviceState(serviceB)); + assertSame("service registered", ServiceState.registered, registry.serviceState(serviceC)); + + registry.startNewServices(); + assertNotNull("service found", registry.getService(serviceA)); + assertNotNull("service found", registry.getService(serviceC)); + + registry.disposeRegistry(true); + } + + /** + * Test a set extending another set. + * * @throws IOException + * + * @throws ServiceException + * @throws DeclarationException + */ + @Test + public void testBadDeclaration() throws IOException, ServiceException, DeclarationException { + // Create a declaration provider, and a factory + IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml"); + IServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry); + ServiceRegistryFactory factory = new ServiceRegistryFactory(declarationsProvider); + // Create ServiceRegistry from factory + + // Create a ServiceRegistry + ServicesRegistry registry; + // String servicesSetName = "badSetExtendsIdMissing"; + try { + registry = factory.getServicesRegistry("badSetExtendsIdMissingRegistry"); + registry.startNewServices(); + fail("Exception should be thrown"); + } catch (DeclarationException e) { + // e.printStackTrace(); + } + + } + + /** + * Test a set extending another set. + * * @throws IOException + * + * @throws ServiceException + * @throws DeclarationException + */ + @Test + public void testMissingBadServiceSetName() throws IOException, ServiceException, DeclarationException { + // Create a declaration provider, and a factory + IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml"); + IServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry); + ServiceRegistryFactory factory = new ServiceRegistryFactory(declarationsProvider); + + // Create a ServiceRegistry + ServicesRegistry registry; + // String servicesSetName = "NonExistingName"; + try { + // Create ServiceRegistry from factory + registry = factory.getServicesRegistry("NonExistingName"); + registry.startNewServices(); + fail("Exception should be thrown"); + } catch (DeclarationException e) { + // e.printStackTrace(); + } + + } + + /** + * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.internal.ServicesRegistryConfigurationReaderFromExtensions#loadServicesRegistryConfiguration(org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry, java.lang.String)}. + * + * @throws IOException + * @throws ServiceException + * @throws DeclarationException + */ + @Test + public void testServicesWithExtends() throws IOException, ServiceException, DeclarationException { + + // Create a declaration provider, and a factory + IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml"); + IServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry); + ServiceRegistryFactory factory = new ServiceRegistryFactory(declarationsProvider); + // Create ServiceRegistry from factory + ServicesRegistry registry = factory.getServicesRegistry("dependantServicesRegistry"); + + // String servicesSetName = "dependantServices"; + FakeService.getTrace().reset(); + registry.startNewServices(); + + + // check services + Class<?> serviceA = FakeServiceA.class; + Class<?> serviceB = FakeServiceB.class; + Class<?> serviceC = FakeServiceC.class; + // A and C should be started, B should not be started. + assertTrue("A started", registry.isStarted(serviceA)); + assertFalse("B not started", registry.isStarted(serviceB)); + assertTrue("C started", registry.isStarted(serviceC)); + + // Check if we can get them + assertNotNull("got service started", registry.getService(serviceC)); + assertNotNull("got service started", registry.getService(serviceA)); + + // check creation order (C then A) + // order should be C, A + TestTrace trace = FakeService.getTrace(); + int i = 0; + assertEquals("order", serviceC.getSimpleName() + ",create", trace.getNameTrace(i++)); + assertEquals("order", serviceA.getSimpleName() + ",create", trace.getNameTrace(i++)); + + assertEquals("order", serviceC.getSimpleName() + ",init", trace.getNameTrace(i++)); + assertEquals("order", serviceA.getSimpleName() + ",init", trace.getNameTrace(i++)); + + assertEquals("order", serviceC.getSimpleName() + ",start", trace.getNameTrace(i++)); + assertEquals("order", serviceA.getSimpleName() + ",start", trace.getNameTrace(i++)); + + // start B + assertNotNull("got service started", registry.getService(serviceB)); + assertTrue("B started", registry.isStarted(serviceB)); + + registry.disposeRegistry(true); + } + + + + /** + * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.internal.ServicesRegistryConfigurationReaderFromExtensions#loadServicesSetConfiguration(org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry, java.lang.String)}. + */ + @Test + public void testLoadServicesRegistryConfiguration() { + fail("Not yet implemented"); + } + + /** + * Check if a serviceSet declared in several fragments with the same name is correctly loaded. + * + * @throws IOException + * @throws ServiceException + * @throws DeclarationException + */ + @Test + public void testLoadServicesSetFromPartialFragments() throws IOException, ServiceException, DeclarationException { + + // Create a declaration provider, and a factory + IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml"); + IServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry); + ServiceRegistryFactory factory = new ServiceRegistryFactory(declarationsProvider); + // Create ServiceRegistry from factory + ServicesRegistry registry = factory.getServicesRegistry("doubleNameRegistry"); + + // Create a ServiceRegistry + // String servicesSetName = "doubleName"; + + // Check if specified service are in the registry + Class<?> serviceA = FakeServiceA.class; + Class<?> serviceB = FakeServiceB.class; + + assertNotNull("service registered", registry.serviceState(serviceA)); + assertSame("service registered", ServiceState.registered, registry.serviceState(serviceA)); + assertSame("service registered", ServiceState.registered, registry.serviceState(serviceB)); + + registry.startNewServices(); + assertNotNull("service found", registry.getService(serviceA)); + assertNotNull("service found", registry.getService(serviceB)); + + registry.disposeRegistry(true); + } + + /** + * Check if a serviceSet declared in several fragments with the same name is correctly loaded. + * + * @throws IOException + * @throws ServiceException + * @throws DeclarationException + * @throws ServiceException + */ + @Test + public void testLoadAlias() throws IOException, DeclarationException, ServiceException { + + // Create a declaration provider, and a factory + IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml"); + IServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry); + ServiceRegistryFactory factory = new ServiceRegistryFactory(declarationsProvider); + // Create ServiceRegistry from factory + ServicesRegistry registry = factory.getServicesRegistry("setWithAliasRegistry"); + registry.startNewServices(); + + // Check if specified service are in the registry + Class<?> serviceA = FakeServiceA.class; + String aliasService = "AnAlias"; + assertNotNull("service found", registry.getService(serviceA)); + assertNotNull("service found", registry.getService(aliasService)); + assertSame("same service", registry.getService(serviceA), registry.getService(aliasService)); + registry.disposeRegistry(true); + } + + +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ExtensionServiceDescriptorsWithIdProviderTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ExtensionServiceDescriptorsWithIdProviderTest.java index b15d27e22c1..b0337a8345b 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ExtensionServiceDescriptorsWithIdProviderTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ExtensionServiceDescriptorsWithIdProviderTest.java @@ -1,185 +1,185 @@ -/*****************************************************************************
- * Copyright (c) 2012 Cedric Dumoulin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.core.serviceregistry;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.List;
-
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.RegistryIdDesc;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-
-/**
- * @author cedric dumoulin
- *
- */
-public class ExtensionServiceDescriptorsWithIdProviderTest extends AbstractServiceDescriptorsWithIdProviderTest {
-
- static final String PLUGIN_XML = "resources/plugin.xml";
-
- /**
- * @throws java.lang.Exception
- */
- @Before
- public void setUp() throws Exception {
- }
-
- /**
- * @throws java.lang.Exception
- */
- @After
- public void tearDown() throws Exception {
- }
-
- /**
- * Load a RegistryDesc from the specified declaration file.
- *
- * @param extensionFileName
- * The name of the resource containing declarations
- * @param registryName
- * The name of the registry to load.
- * @return The descriptor for the registry.
- *
- * @throws IOException
- * @throws ServiceException
- * @throws DeclarationException
- */
- @Override
- public RegistryIdDesc getRegistryDesc(String extensionFileName, String registryName) throws IOException, ServiceException, DeclarationException {
- // create provider, reading description from specified file.
- IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry(extensionFileName);
-
- ExtensionServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry);
- assertNotNull("provider created", declarationsProvider);
-
- RegistryIdDesc registryIdDesc = declarationsProvider.getRegistryDescriptor(registryName);
-
- return registryIdDesc;
- }
-
- /**
- * Load a ServiceSetDesc from the specified declaration file.
- *
- * @param extensionFileName
- * The name of the resource containing declarations
- * @param serviceSetName
- * The name of the serviceSet to load.
- * @return The descriptor for the ServiceSet
- * @throws IOException
- * @throws ServiceException
- * @throws DeclarationException
- */
- @Override
- public ServiceSetIdDesc getServiceSetDesc(String extensionFileName, String serviceSetName) throws IOException, ServiceException, DeclarationException {
- // create provider, reading description from specified file.
- IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry(extensionFileName);
-
- ExtensionServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry);
- assertNotNull("provider created", declarationsProvider);
-
- ServiceSetIdDesc serviceSetIdDesc = declarationsProvider.getServiceSet(serviceSetName);
-
- return serviceSetIdDesc;
- }
-
- /**
- * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ExtensionServiceDescriptorsWithIdProvider#getServiceSetFragments(java.lang.String)}.
- *
- * @throws IOException
- * @throws ServiceException
- * @throws DeclarationException
- */
- @Test
- public void testGetServiceSetFragments() throws IOException, ServiceException, DeclarationException {
- // create provider, reading description from specified file.
- IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml");
-
- ExtensionServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry);
-
- // Tests
- assertNotNull("provider created", declarationsProvider);
- List<ServiceSetIdDesc> fragments = declarationsProvider.getServiceSetFragments("fragmentA");
- assertNotNull("Get fragments", fragments);
-
- assertTrue("fragments found", fragments.size() > 0);
- // Get the first fragment and test it
- ServiceSetIdDesc serviceSet = fragments.get(0);
- assertNotNull("Fragment exist", serviceSet);
-
- assertTrue("extends set", serviceSet.getExtends().size() > 0);
- assertTrue("extends set", serviceSet.getExtends().contains("fragmentB"));
-
- }
-
- /**
- * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ExtensionServiceDescriptorsWithIdProvider#getServiceSetFragments(java.lang.String)}.
- *
- * @throws IOException
- * @throws ServiceException
- * @throws DeclarationException
- */
- @Test
- public void testGetServiceSetFragmentsWithMultiFragments() throws IOException, ServiceException, DeclarationException {
- // create provider, reading description from specified file.
- IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml");
-
- ExtensionServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry);
-
- // Tests
- assertNotNull("provider created", declarationsProvider);
- List<ServiceSetIdDesc> fragments = declarationsProvider.getServiceSetFragments("multiFragmentA");
- assertNotNull("Get fragments", fragments);
-
- assertTrue("fragments found", fragments.size() > 0);
- assertTrue("fragments found", fragments.size() > 1);
- }
-
-
- /**
- * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ExtensionServiceDescriptorsWithIdProvider#getServiceSet(java.lang.String)}.
- *
- * @throws IOException
- * @throws ServiceException
- * @throws DeclarationException
- */
- @Test
- public void testGetServiceSetFromMultiFragment() throws IOException, ServiceException, DeclarationException {
- // create provider, reading description from specified file.
- IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml");
-
- ExtensionServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry);
-
- // Tests
- assertNotNull("provider created", declarationsProvider);
- ServiceSetIdDesc serviceSet = declarationsProvider.getServiceSet("multiFragmentA");
-
- assertNotNull("Fragment exist", serviceSet);
-
- assertTrue("extends set", serviceSet.getExtends().size() > 0);
- assertTrue("extends set", serviceSet.getExtends().contains("fragmentB"));
-
- }
-
-
-
-
-}
+/***************************************************************************** + * Copyright (c) 2012 Cedric Dumoulin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.core.serviceregistry; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.io.IOException; +import java.util.List; + +import org.eclipse.core.runtime.IExtensionRegistry; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.RegistryIdDesc; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + + +/** + * @author cedric dumoulin + * + */ +public class ExtensionServiceDescriptorsWithIdProviderTest extends AbstractServiceDescriptorsWithIdProviderTest { + + static final String PLUGIN_XML = "resources/plugin.xml"; + + /** + * @throws java.lang.Exception + */ + @Before + public void setUp() throws Exception { + } + + /** + * @throws java.lang.Exception + */ + @After + public void tearDown() throws Exception { + } + + /** + * Load a RegistryDesc from the specified declaration file. + * + * @param extensionFileName + * The name of the resource containing declarations + * @param registryName + * The name of the registry to load. + * @return The descriptor for the registry. + * + * @throws IOException + * @throws ServiceException + * @throws DeclarationException + */ + @Override + public RegistryIdDesc getRegistryDesc(String extensionFileName, String registryName) throws IOException, ServiceException, DeclarationException { + // create provider, reading description from specified file. + IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry(extensionFileName); + + ExtensionServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry); + assertNotNull("provider created", declarationsProvider); + + RegistryIdDesc registryIdDesc = declarationsProvider.getRegistryDescriptor(registryName); + + return registryIdDesc; + } + + /** + * Load a ServiceSetDesc from the specified declaration file. + * + * @param extensionFileName + * The name of the resource containing declarations + * @param serviceSetName + * The name of the serviceSet to load. + * @return The descriptor for the ServiceSet + * @throws IOException + * @throws ServiceException + * @throws DeclarationException + */ + @Override + public ServiceSetIdDesc getServiceSetDesc(String extensionFileName, String serviceSetName) throws IOException, ServiceException, DeclarationException { + // create provider, reading description from specified file. + IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry(extensionFileName); + + ExtensionServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry); + assertNotNull("provider created", declarationsProvider); + + ServiceSetIdDesc serviceSetIdDesc = declarationsProvider.getServiceSet(serviceSetName); + + return serviceSetIdDesc; + } + + /** + * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ExtensionServiceDescriptorsWithIdProvider#getServiceSetFragments(java.lang.String)}. + * + * @throws IOException + * @throws ServiceException + * @throws DeclarationException + */ + @Test + public void testGetServiceSetFragments() throws IOException, ServiceException, DeclarationException { + // create provider, reading description from specified file. + IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml"); + + ExtensionServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry); + + // Tests + assertNotNull("provider created", declarationsProvider); + List<ServiceSetIdDesc> fragments = declarationsProvider.getServiceSetFragments("fragmentA"); + assertNotNull("Get fragments", fragments); + + assertTrue("fragments found", fragments.size() > 0); + // Get the first fragment and test it + ServiceSetIdDesc serviceSet = fragments.get(0); + assertNotNull("Fragment exist", serviceSet); + + assertTrue("extends set", serviceSet.getExtends().size() > 0); + assertTrue("extends set", serviceSet.getExtends().contains("fragmentB")); + + } + + /** + * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ExtensionServiceDescriptorsWithIdProvider#getServiceSetFragments(java.lang.String)}. + * + * @throws IOException + * @throws ServiceException + * @throws DeclarationException + */ + @Test + public void testGetServiceSetFragmentsWithMultiFragments() throws IOException, ServiceException, DeclarationException { + // create provider, reading description from specified file. + IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml"); + + ExtensionServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry); + + // Tests + assertNotNull("provider created", declarationsProvider); + List<ServiceSetIdDesc> fragments = declarationsProvider.getServiceSetFragments("multiFragmentA"); + assertNotNull("Get fragments", fragments); + + assertTrue("fragments found", fragments.size() > 0); + assertTrue("fragments found", fragments.size() > 1); + } + + + /** + * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ExtensionServiceDescriptorsWithIdProvider#getServiceSet(java.lang.String)}. + * + * @throws IOException + * @throws ServiceException + * @throws DeclarationException + */ + @Test + public void testGetServiceSetFromMultiFragment() throws IOException, ServiceException, DeclarationException { + // create provider, reading description from specified file. + IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml"); + + ExtensionServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry); + + // Tests + assertNotNull("provider created", declarationsProvider); + ServiceSetIdDesc serviceSet = declarationsProvider.getServiceSet("multiFragmentA"); + + assertNotNull("Fragment exist", serviceSet); + + assertTrue("extends set", serviceSet.getExtends().size() > 0); + assertTrue("extends set", serviceSet.getExtends().contains("fragmentB")); + + } + + + + +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeService.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeService.java index 5c61855f466..f9673ffbc9f 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeService.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeService.java @@ -1,79 +1,79 @@ -package org.eclipse.papyrus.infra.core.serviceregistry;
-
-
-
-/**
- * Fake service for testing purpose.
- *
- * @author cedric dumoulin
- *
- */
-public class FakeService implements IService {
-
-
- static public TestTrace trace = new TestTrace();
-
- static int count = 0;
-
- public String name = "name" + count++;
-
-
- /**
- *
- * Constructor.
- *
- */
- public FakeService() {
- trace.addTrace(name, "create");
- }
-
- /**
- * Constructor.
- *
- * @param name
- */
- public FakeService(String name) {
- this.name = name;
- trace.addTrace(name, "create");
- }
-
-
- /**
- * @return the name
- */
- public String getName() {
- return name;
- }
-
- /**
- * @return the trace
- */
- static public TestTrace getTrace() {
- return trace;
- }
-
-
- /**
- * @param trace
- * the trace to set
- */
- public void setTrace(TestTrace trace) {
- FakeService.trace = trace;
- }
-
- @Override
- public void init(ServicesRegistry servicesRegistry) {
- trace.addTrace(name, "init", servicesRegistry);
- }
-
- @Override
- public void startService() {
- trace.addTrace(name, "start");
- }
-
- @Override
- public void disposeService() {
- trace.addTrace(name, "dispose");
- }
-
-}
+package org.eclipse.papyrus.infra.core.serviceregistry; + + + +/** + * Fake service for testing purpose. + * + * @author cedric dumoulin + * + */ +public class FakeService implements IService { + + + static public TestTrace trace = new TestTrace(); + + static int count = 0; + + public String name = "name" + count++; + + + /** + * + * Constructor. + * + */ + public FakeService() { + trace.addTrace(name, "create"); + } + + /** + * Constructor. + * + * @param name + */ + public FakeService(String name) { + this.name = name; + trace.addTrace(name, "create"); + } + + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @return the trace + */ + static public TestTrace getTrace() { + return trace; + } + + + /** + * @param trace + * the trace to set + */ + public void setTrace(TestTrace trace) { + FakeService.trace = trace; + } + + @Override + public void init(ServicesRegistry servicesRegistry) { + trace.addTrace(name, "init", servicesRegistry); + } + + @Override + public void startService() { + trace.addTrace(name, "start"); + } + + @Override + public void disposeService() { + trace.addTrace(name, "dispose"); + } + +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceA.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceA.java index 216c65e4743..dfa0020ea5a 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceA.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceA.java @@ -1,28 +1,28 @@ -/*****************************************************************************
- * Copyright (c) 2012 Cedric Dumoulin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.core.serviceregistry;
-
-
-/**
- * @author cedric dumoulin
- *
- */
-public class FakeServiceA extends FakeService {
-
- public FakeServiceA() {
- super(FakeServiceA.class.getSimpleName());
- }
-
-}
+/***************************************************************************** + * Copyright (c) 2012 Cedric Dumoulin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.core.serviceregistry; + + +/** + * @author cedric dumoulin + * + */ +public class FakeServiceA extends FakeService { + + public FakeServiceA() { + super(FakeServiceA.class.getSimpleName()); + } + +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceB.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceB.java index ab1677f607b..af2bf447ffe 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceB.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceB.java @@ -1,28 +1,28 @@ -/*****************************************************************************
- * Copyright (c) 2012 Cedric Dumoulin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.core.serviceregistry;
-
-
-/**
- * @author cedric dumoulin
- *
- */
-public class FakeServiceB extends FakeService {
-
- public FakeServiceB() {
- super(FakeServiceB.class.getSimpleName());
- }
-
-}
+/***************************************************************************** + * Copyright (c) 2012 Cedric Dumoulin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.core.serviceregistry; + + +/** + * @author cedric dumoulin + * + */ +public class FakeServiceB extends FakeService { + + public FakeServiceB() { + super(FakeServiceB.class.getSimpleName()); + } + +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceC.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceC.java index e5b7bd7b744..da5d9e78cc4 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceC.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceC.java @@ -1,28 +1,28 @@ -/*****************************************************************************
- * Copyright (c) 2012 Cedric Dumoulin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.core.serviceregistry;
-
-
-/**
- * @author cedric dumoulin
- *
- */
-public class FakeServiceC extends FakeService {
-
- public FakeServiceC() {
- super(FakeServiceC.class.getSimpleName());
- }
-
-}
+/***************************************************************************** + * Copyright (c) 2012 Cedric Dumoulin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.core.serviceregistry; + + +/** + * @author cedric dumoulin + * + */ +public class FakeServiceC extends FakeService { + + public FakeServiceC() { + super(FakeServiceC.class.getSimpleName()); + } + +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceDescriptor.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceDescriptor.java index 705038e89ec..536c829082c 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceDescriptor.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceDescriptor.java @@ -1,43 +1,43 @@ -package org.eclipse.papyrus.infra.core.serviceregistry;
-
-import java.util.List;
-
-/**
- * Service Descriptor used to create a named FakeService.
- */
-public class FakeServiceDescriptor extends ServiceDescriptor {
-
- /**
- *
- * Constructor.
- * Create a descriptor for a FakeService with a specified name.
- *
- * @param key
- * @param startKind
- */
- public FakeServiceDescriptor(String key, ServiceStartKind startKind) {
- super(key, FakeService.class.getName(), startKind, 1);
- }
-
- /**
- *
- * Constructor.
- * Create a descriptor for a FakeService with a specified name.
- *
- * @param key
- * @param startKind
- * @param requiredService
- */
- public FakeServiceDescriptor(String key, ServiceStartKind startKind, List<String> requiredService) {
- super(key, FakeService.class.getName(), startKind, 1, requiredService);
- }
-
- /**
- * Get the type of the created service.
- *
- * @return
- */
- static public Class<?> getServiceType() {
- return FakeService.class;
- }
-}
+package org.eclipse.papyrus.infra.core.serviceregistry; + +import java.util.List; + +/** + * Service Descriptor used to create a named FakeService. + */ +public class FakeServiceDescriptor extends ServiceDescriptor { + + /** + * + * Constructor. + * Create a descriptor for a FakeService with a specified name. + * + * @param key + * @param startKind + */ + public FakeServiceDescriptor(String key, ServiceStartKind startKind) { + super(key, FakeService.class.getName(), startKind, 1); + } + + /** + * + * Constructor. + * Create a descriptor for a FakeService with a specified name. + * + * @param key + * @param startKind + * @param requiredService + */ + public FakeServiceDescriptor(String key, ServiceStartKind startKind, List<String> requiredService) { + super(key, FakeService.class.getName(), startKind, 1, requiredService); + } + + /** + * Get the type of the created service. + * + * @return + */ + static public Class<?> getServiceType() { + return FakeService.class; + } +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceFactory.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceFactory.java index 3206e7998f7..88e3e5b757a 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceFactory.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeServiceFactory.java @@ -1,70 +1,70 @@ -package org.eclipse.papyrus.infra.core.serviceregistry;
-
-
-
-/**
- * Fake service factory for testing purpose.
- *
- * @author cedric dumoulin
- *
- */
-public class FakeServiceFactory extends FakeService implements IServiceFactory {
-
-
- /**
- *
- * Constructor.
- *
- */
- public FakeServiceFactory() {
-
- super("factoryName" + count++);
- }
-
- /**
- * Constructor.
- *
- * @param name
- */
- public FakeServiceFactory(String name) {
- super(name);
- }
-
-
- /**
- * @return the name
- */
- @Override
- public String getName() {
- return name;
- }
-
- /**
- * Create the service
- *
- * @see org.eclipse.papyrus.infra.core.serviceregistry.IServiceFactory#createServiceInstance()
- *
- * @return
- */
- @Override
- public Object createServiceInstance() {
- trace.addTrace(getName(), "createInstance");
- return new FakeCreatedService();
- }
-
- /**
- * Pseudo service created by the factory.
- *
- * @author dumoulin
- *
- */
- public class FakeCreatedService {
-
- /**
- * @return the name
- */
- public String getName() {
- return name;
- }
- }
-}
+package org.eclipse.papyrus.infra.core.serviceregistry; + + + +/** + * Fake service factory for testing purpose. + * + * @author cedric dumoulin + * + */ +public class FakeServiceFactory extends FakeService implements IServiceFactory { + + + /** + * + * Constructor. + * + */ + public FakeServiceFactory() { + + super("factoryName" + count++); + } + + /** + * Constructor. + * + * @param name + */ + public FakeServiceFactory(String name) { + super(name); + } + + + /** + * @return the name + */ + @Override + public String getName() { + return name; + } + + /** + * Create the service + * + * @see org.eclipse.papyrus.infra.core.serviceregistry.IServiceFactory#createServiceInstance() + * + * @return + */ + @Override + public Object createServiceInstance() { + trace.addTrace(getName(), "createInstance"); + return new FakeCreatedService(); + } + + /** + * Pseudo service created by the factory. + * + * @author dumoulin + * + */ + public class FakeCreatedService { + + /** + * @return the name + */ + public String getName() { + return name; + } + } +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeWithRequiredServiceFactory.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeWithRequiredServiceFactory.java index f07aeb638d5..b1d61408acd 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeWithRequiredServiceFactory.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/FakeWithRequiredServiceFactory.java @@ -1,54 +1,54 @@ -package org.eclipse.papyrus.infra.core.serviceregistry;
-
-
-
-/**
- * Fake service factory for testing purpose.
- * This service require the
- *
- * @author cedric dumoulin
- *
- */
-public class FakeWithRequiredServiceFactory extends FakeServiceFactory implements IServiceFactory {
-
-
- /**
- *
- * Constructor.
- *
- */
- public FakeWithRequiredServiceFactory() {
-
- super("factoryName" + count++);
- }
-
- /**
- * Constructor.
- *
- * @param name
- */
- public FakeWithRequiredServiceFactory(String name) {
- super(name);
- }
-
-
- /**
- *
- * @see org.eclipse.papyrus.infra.core.serviceregistry.FakeService#init(org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry)
- *
- * @param servicesRegistry
- */
- @Override
- public void init(ServicesRegistry servicesRegistry) {
-
- trace.addTrace(name, "init");
- Object foundService = null;
- try {
- foundService = servicesRegistry.getService("C");
- } catch (ServiceException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- trace.addTrace(name, "initEnd", foundService);
- }
-}
+package org.eclipse.papyrus.infra.core.serviceregistry; + + + +/** + * Fake service factory for testing purpose. + * This service require the + * + * @author cedric dumoulin + * + */ +public class FakeWithRequiredServiceFactory extends FakeServiceFactory implements IServiceFactory { + + + /** + * + * Constructor. + * + */ + public FakeWithRequiredServiceFactory() { + + super("factoryName" + count++); + } + + /** + * Constructor. + * + * @param name + */ + public FakeWithRequiredServiceFactory(String name) { + super(name); + } + + + /** + * + * @see org.eclipse.papyrus.infra.core.serviceregistry.FakeService#init(org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry) + * + * @param servicesRegistry + */ + @Override + public void init(ServicesRegistry servicesRegistry) { + + trace.addTrace(name, "init"); + Object foundService = null; + try { + foundService = servicesRegistry.getService("C"); + } catch (ServiceException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + trace.addTrace(name, "initEnd", foundService); + } +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceA.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceA.java index 61ebbbe5f4a..f6e2e77a34d 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceA.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceA.java @@ -1,52 +1,52 @@ -package org.eclipse.papyrus.infra.core.serviceregistry;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class ServiceA implements IService {
-
- public enum TraceKind {
- init, start, dispose
- }
-
- static List<TraceKind> trace = new ArrayList<TraceKind>();
-
- static List<String> nametrace = new ArrayList<String>();
-
-
-
- static public TraceKind getEvent(int index) {
- return trace.get(index);
- }
-
- static public String getTraceName(int index) {
- return nametrace.get(index);
- }
-
- static public void resetTrace() {
- trace.clear();
- nametrace.clear();
- }
-
- @Override
- public void init(ServicesRegistry servicesRegistry) {
- trace.add(TraceKind.init);
- nametrace.add(this.getClass().getSimpleName());
-
- }
-
- @Override
- public void startService() {
- trace.add(TraceKind.start);
- nametrace.add(this.getClass().getSimpleName());
-
- }
-
- @Override
- public void disposeService() {
- trace.add(TraceKind.dispose);
- nametrace.add(this.getClass().getSimpleName());
-
- }
-
-}
+package org.eclipse.papyrus.infra.core.serviceregistry; + +import java.util.ArrayList; +import java.util.List; + +public class ServiceA implements IService { + + public enum TraceKind { + init, start, dispose + } + + static List<TraceKind> trace = new ArrayList<TraceKind>(); + + static List<String> nametrace = new ArrayList<String>(); + + + + static public TraceKind getEvent(int index) { + return trace.get(index); + } + + static public String getTraceName(int index) { + return nametrace.get(index); + } + + static public void resetTrace() { + trace.clear(); + nametrace.clear(); + } + + @Override + public void init(ServicesRegistry servicesRegistry) { + trace.add(TraceKind.init); + nametrace.add(this.getClass().getSimpleName()); + + } + + @Override + public void startService() { + trace.add(TraceKind.start); + nametrace.add(this.getClass().getSimpleName()); + + } + + @Override + public void disposeService() { + trace.add(TraceKind.dispose); + nametrace.add(this.getClass().getSimpleName()); + + } + +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceA10.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceA10.java index f4036ffc6da..07909845b65 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceA10.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceA10.java @@ -1,6 +1,6 @@ -package org.eclipse.papyrus.infra.core.serviceregistry;
-
-
-public class ServiceA10 extends ServiceA {
-
-}
+package org.eclipse.papyrus.infra.core.serviceregistry; + + +public class ServiceA10 extends ServiceA { + +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceB.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceB.java index b1fb167ebcd..fb508a0ce27 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceB.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceB.java @@ -1,6 +1,6 @@ -package org.eclipse.papyrus.infra.core.serviceregistry;
-
-
-public class ServiceB extends ServiceA {
-
-}
+package org.eclipse.papyrus.infra.core.serviceregistry; + + +public class ServiceB extends ServiceA { + +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceC.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceC.java index 6ce1bfa77cc..17cf6f1cea1 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceC.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceC.java @@ -1,6 +1,6 @@ -package org.eclipse.papyrus.infra.core.serviceregistry;
-
-
-public class ServiceC extends ServiceA {
-
-}
+package org.eclipse.papyrus.infra.core.serviceregistry; + + +public class ServiceC extends ServiceA { + +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceDescriptorsWithIdProviderCollectionTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceDescriptorsWithIdProviderCollectionTest.java index bd63cff2de4..4a53db85975 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceDescriptorsWithIdProviderCollectionTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceDescriptorsWithIdProviderCollectionTest.java @@ -1,115 +1,115 @@ -package org.eclipse.papyrus.infra.core.serviceregistry;
-
-import static org.junit.Assert.assertNotNull;
-
-import java.io.IOException;
-
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.RegistryIdDesc;
-import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-
-public class ServiceDescriptorsWithIdProviderCollectionTest extends AbstractServiceDescriptorsWithIdProviderTest {
-
- /**
- * Load a RegistryDesc from the specified declaration file.
- *
- * @param extensionFileName
- * The name of the resource containing declarations
- * @param registryName
- * The name of the registry to load.
- * @return The descriptor for the registry.
- *
- * @throws IOException
- * @throws ServiceException
- * @throws DeclarationException
- */
- @Override
- public RegistryIdDesc getRegistryDesc(String extensionFileName, String registryName) throws IOException, ServiceException, DeclarationException {
- // create provider, reading description from specified file.
- IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry(extensionFileName);
-
- ExtensionServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry);
- assertNotNull("provider created", declarationsProvider);
-
- // Create the collection
- ServiceDescriptorsWithIdProviderCollection providerCollection = new ServiceDescriptorsWithIdProviderCollection();
- providerCollection.addAll(declarationsProvider);
-
- // Get the registry thru the collection
- RegistryIdDesc registryIdDesc = providerCollection.getRegistryIdDesc(registryName);
-
- return registryIdDesc;
- }
-
- /**
- * Load a ServiceSetDesc from the specified declaration file.
- *
- * @param extensionFileName
- * The name of the resource containing declarations
- * @param serviceSetName
- * The name of the serviceSet to load.
- * @return The descriptor for the ServiceSet
- * @throws IOException
- * @throws ServiceException
- * @throws DeclarationException
- */
- @Override
- public ServiceSetIdDesc getServiceSetDesc(String extensionFileName, String serviceSetName) throws IOException, ServiceException, DeclarationException {
- // create provider, reading description from specified file.
- IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry(extensionFileName);
-
- ExtensionServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry);
- assertNotNull("provider created", declarationsProvider);
-
- // Create the collection
- ServiceDescriptorsWithIdProviderCollection providerCollection = new ServiceDescriptorsWithIdProviderCollection();
- providerCollection.addAll(declarationsProvider);
-
- // Get the set thru the collection
- ServiceSetIdDesc serviceSetIdDesc = providerCollection.getServiceSet(serviceSetName);
- return serviceSetIdDesc;
- }
-
- @Before
- public void setUp() throws Exception {
- }
-
- @After
- public void tearDown() throws Exception {
- }
-
- /**
- *
- */
- @Test
- public void testServiceDescriptorsWithIdProviderCollection() {
- ServiceDescriptorsWithIdProviderCollection providerCollection = new ServiceDescriptorsWithIdProviderCollection();
- assertNotNull("collection created", providerCollection);
- }
-
- /**
- * @throws IOException
- * @throws ServiceException
- *
- */
- @Test
- public void testAddAll() throws IOException, ServiceException {
- // create provider, reading description from specified file.
- IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry(PLUGIN_XML);
-
- ExtensionServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry);
- assertNotNull("provider created", declarationsProvider);
-
- // Create the collection
- ServiceDescriptorsWithIdProviderCollection providerCollection = new ServiceDescriptorsWithIdProviderCollection();
- providerCollection.addAll(declarationsProvider);
- assertNotNull("collection created", providerCollection);
-
- }
-
-
-}
+package org.eclipse.papyrus.infra.core.serviceregistry; + +import static org.junit.Assert.assertNotNull; + +import java.io.IOException; + +import org.eclipse.core.runtime.IExtensionRegistry; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.RegistryIdDesc; +import org.eclipse.papyrus.infra.core.serviceregistry.servicedescriptorswithid.ServiceSetIdDesc; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + + +public class ServiceDescriptorsWithIdProviderCollectionTest extends AbstractServiceDescriptorsWithIdProviderTest { + + /** + * Load a RegistryDesc from the specified declaration file. + * + * @param extensionFileName + * The name of the resource containing declarations + * @param registryName + * The name of the registry to load. + * @return The descriptor for the registry. + * + * @throws IOException + * @throws ServiceException + * @throws DeclarationException + */ + @Override + public RegistryIdDesc getRegistryDesc(String extensionFileName, String registryName) throws IOException, ServiceException, DeclarationException { + // create provider, reading description from specified file. + IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry(extensionFileName); + + ExtensionServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry); + assertNotNull("provider created", declarationsProvider); + + // Create the collection + ServiceDescriptorsWithIdProviderCollection providerCollection = new ServiceDescriptorsWithIdProviderCollection(); + providerCollection.addAll(declarationsProvider); + + // Get the registry thru the collection + RegistryIdDesc registryIdDesc = providerCollection.getRegistryIdDesc(registryName); + + return registryIdDesc; + } + + /** + * Load a ServiceSetDesc from the specified declaration file. + * + * @param extensionFileName + * The name of the resource containing declarations + * @param serviceSetName + * The name of the serviceSet to load. + * @return The descriptor for the ServiceSet + * @throws IOException + * @throws ServiceException + * @throws DeclarationException + */ + @Override + public ServiceSetIdDesc getServiceSetDesc(String extensionFileName, String serviceSetName) throws IOException, ServiceException, DeclarationException { + // create provider, reading description from specified file. + IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry(extensionFileName); + + ExtensionServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry); + assertNotNull("provider created", declarationsProvider); + + // Create the collection + ServiceDescriptorsWithIdProviderCollection providerCollection = new ServiceDescriptorsWithIdProviderCollection(); + providerCollection.addAll(declarationsProvider); + + // Get the set thru the collection + ServiceSetIdDesc serviceSetIdDesc = providerCollection.getServiceSet(serviceSetName); + return serviceSetIdDesc; + } + + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + /** + * + */ + @Test + public void testServiceDescriptorsWithIdProviderCollection() { + ServiceDescriptorsWithIdProviderCollection providerCollection = new ServiceDescriptorsWithIdProviderCollection(); + assertNotNull("collection created", providerCollection); + } + + /** + * @throws IOException + * @throws ServiceException + * + */ + @Test + public void testAddAll() throws IOException, ServiceException { + // create provider, reading description from specified file. + IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry(PLUGIN_XML); + + ExtensionServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry); + assertNotNull("provider created", declarationsProvider); + + // Create the collection + ServiceDescriptorsWithIdProviderCollection providerCollection = new ServiceDescriptorsWithIdProviderCollection(); + providerCollection.addAll(declarationsProvider); + assertNotNull("collection created", providerCollection); + + } + + +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServicePojoA.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServicePojoA.java index 577e3e9e784..c2152b2b4ad 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServicePojoA.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServicePojoA.java @@ -1,6 +1,6 @@ -package org.eclipse.papyrus.infra.core.serviceregistry;
-
-
-public class ServicePojoA extends ServiceA {
-
-}
+package org.eclipse.papyrus.infra.core.serviceregistry; + + +public class ServicePojoA extends ServiceA { + +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceRegistryFactoryTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceRegistryFactoryTest.java index 6d406619ba8..c4a9028ad83 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceRegistryFactoryTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceRegistryFactoryTest.java @@ -1,89 +1,89 @@ -/*****************************************************************************
- * Copyright (c) 2012 Cedric Dumoulin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.core.serviceregistry;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-
-/**
- * @author cedric dumoulin
- *
- */
-public class ServiceRegistryFactoryTest {
-
- /**
- * @throws java.lang.Exception
- */
- @Before
- public void setUp() throws Exception {
- }
-
- /**
- * @throws java.lang.Exception
- */
- @After
- public void tearDown() throws Exception {
- }
-
- /**
- * Integration test.
- * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ServiceRegistryFactory#getServicesRegistry(java.lang.String)}.
- *
- * @throws DeclarationException
- * @throws IOException
- * @throws ServiceMultiException
- */
- @Test
- public void testGetServicesRegistryString() throws DeclarationException, ServiceException, IOException {
-
-
- // Initialize Factory
- IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml");
-
- IServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry);
- ServiceRegistryFactory factory = new ServiceRegistryFactory(declarationsProvider);
-
-
- String serviceA = FakeServiceA.class.getName();
- String serviceB = FakeServiceB.class.getName();
- // Create ServiceRegistry from factory
- ServicesRegistry servicesRegistry = factory.getServicesRegistry("simpleTestRegistry");
- servicesRegistry.startNewServices();
-
- // Check result
- assertNotNull("registry created", servicesRegistry);
-
- assertNotNull("Get registered service", servicesRegistry.getService(serviceA));
- assertNotNull("Get registered service", servicesRegistry.getService(serviceB));
-
- }
-
- /**
- * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ServiceRegistryFactory#extendsServicesRegistry(org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry, java.lang.String)}.
- */
- @Test
- public void testExtendsServicesRegistryServicesRegistryString() {
- fail("Not yet implemented");
- }
-
-}
+/***************************************************************************** + * Copyright (c) 2012 Cedric Dumoulin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.core.serviceregistry; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.fail; + +import java.io.IOException; + +import org.eclipse.core.runtime.IExtensionRegistry; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + + +/** + * @author cedric dumoulin + * + */ +public class ServiceRegistryFactoryTest { + + /** + * @throws java.lang.Exception + */ + @Before + public void setUp() throws Exception { + } + + /** + * @throws java.lang.Exception + */ + @After + public void tearDown() throws Exception { + } + + /** + * Integration test. + * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ServiceRegistryFactory#getServicesRegistry(java.lang.String)}. + * + * @throws DeclarationException + * @throws IOException + * @throws ServiceMultiException + */ + @Test + public void testGetServicesRegistryString() throws DeclarationException, ServiceException, IOException { + + + // Initialize Factory + IExtensionRegistry extensionRegistry = EclipseExtensionUtils.instance.createRegistry("resources/plugin.xml"); + + IServiceDescriptorsWithIdProvider declarationsProvider = new ExtensionServiceDescriptorsWithIdProviderFromFile(extensionRegistry); + ServiceRegistryFactory factory = new ServiceRegistryFactory(declarationsProvider); + + + String serviceA = FakeServiceA.class.getName(); + String serviceB = FakeServiceB.class.getName(); + // Create ServiceRegistry from factory + ServicesRegistry servicesRegistry = factory.getServicesRegistry("simpleTestRegistry"); + servicesRegistry.startNewServices(); + + // Check result + assertNotNull("registry created", servicesRegistry); + + assertNotNull("Get registered service", servicesRegistry.getService(serviceA)); + assertNotNull("Get registered service", servicesRegistry.getService(serviceB)); + + } + + /** + * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ServiceRegistryFactory#extendsServicesRegistry(org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry, java.lang.String)}. + */ + @Test + public void testExtendsServicesRegistryServicesRegistryString() { + fail("Not yet implemented"); + } + +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceTest.java index 373d8978e04..6d3aaa2c76d 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServiceTest.java @@ -1,52 +1,52 @@ -/*****************************************************************************
- * Copyright (c) 2012 Cedric Dumoulin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.core.serviceregistry;
-
-import static org.junit.Assert.fail;
-
-import org.junit.Test;
-
-
-/**
- * @author cedric dumoulin
- *
- */
-public class ServiceTest {
-
- /**
- * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.annotations.Service#value()}.
- */
- @Test
- public void testValue() {
- fail("Not yet implemented");
- }
-
- /**
- * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.annotations.Service#startupKind()}.
- */
- @Test
- public void testStartupKind() {
- fail("Not yet implemented");
- }
-
- /**
- * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.annotations.Service#priority()}.
- */
- @Test
- public void testPriority() {
- fail("Not yet implemented");
- }
-
-}
+/***************************************************************************** + * Copyright (c) 2012 Cedric Dumoulin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.core.serviceregistry; + +import static org.junit.Assert.fail; + +import org.junit.Test; + + +/** + * @author cedric dumoulin + * + */ +public class ServiceTest { + + /** + * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.annotations.Service#value()}. + */ + @Test + public void testValue() { + fail("Not yet implemented"); + } + + /** + * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.annotations.Service#startupKind()}. + */ + @Test + public void testStartupKind() { + fail("Not yet implemented"); + } + + /** + * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.annotations.Service#priority()}. + */ + @Test + public void testPriority() { + fail("Not yet implemented"); + } + +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServicesRegistryTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServicesRegistryTest.java index 010fbf34304..e8810aa7f9e 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServicesRegistryTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServicesRegistryTest.java @@ -1,909 +1,909 @@ -/**
- *
- */
-package org.eclipse.papyrus.infra.core.serviceregistry;
-
-import java.util.Arrays;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceFactory.FakeCreatedService;
-import org.eclipse.papyrus.infra.core.serviceregistry.ServiceA.TraceKind;
-import org.junit.Test;
-
-
-/**
- * @author dumoulin
- *
- */
-public class ServicesRegistryTest extends TestCase {
-
- /** The registry to test */
- ServicesRegistry servicesRegistry;
-
- ServiceDescriptor serviceADesc = new LazyServiceADescriptor();
-
- ServiceDescriptor serviceA10Desc = new LazyServiceA10Descriptor();
-
- ServiceDescriptor serviceBDesc = new LazyServiceBDescriptor();
-
- ServiceDescriptor serviceCDesc = new ServiceCDescriptor();
-
- ServiceDescriptor servicePojoADesc = new LazyServicePojoADescriptor();
-
- public ServicesRegistryTest(String name) {
- super(name);
- }
-
- /**
- * @throws java.lang.Exception
- */
- @Override
- protected void setUp() throws Exception {
- servicesRegistry = new ServicesRegistry();
- }
-
- /**
- * @throws java.lang.Exception
- */
- @Override
- protected void tearDown() throws Exception {
- }
-
- /**
- * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry#add(org.eclipse.papyrus.infra.core.serviceregistry.ServiceDescriptor)} .
- *
- * @throws ServiceMultiException
- */
- public void testAdd() throws ServiceMultiException {
-
- servicesRegistry.add(serviceADesc);
- servicesRegistry.add(serviceBDesc);
- servicesRegistry.add(serviceCDesc);
- servicesRegistry.add(servicePojoADesc);
-
- // Test entries creation
- // try {
- // assertFalse("serviceA stopped", servicesRegistry.isStarted(serviceADesc.getKey()));
- // assertFalse("serviceB stopped", servicesRegistry.isStarted(serviceBDesc.getKey()));
- // assertFalse("serviceC stopped", servicesRegistry.isStarted(serviceCDesc.getKey()));
- // assertFalse("servicePojoA stopped", servicesRegistry.isStarted(servicePojoADesc.getKey()));
- // } catch (ServiceNotFoundException e) {
- // fail("Service should exist." + e.getMessage());
- // }
-
- // Test startup
- servicesRegistry.startNewServices();
-
- // Test always started
- try {
- assertFalse("serviceA stopped", servicesRegistry.isStarted(serviceADesc.getKey()));
- assertFalse("serviceB stopped", servicesRegistry.isStarted(serviceBDesc.getKey()));
- assertEquals("serviceC state", ServiceState.started, servicesRegistry.serviceState(serviceCDesc.getKey()));
- assertTrue("serviceC started", servicesRegistry.isStarted(serviceCDesc.getKey()));
- assertFalse("servicePojoA stopped", servicesRegistry.isStarted(servicePojoADesc.getKey()));
- } catch (ServiceNotFoundException e) {
- fail("Service should exist.");
- }
-
-
- }
-
- /**
- * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry#getService(java.lang.Object)}.
- *
- * @throws ServiceException
- */
- public void testGetService() throws ServiceException {
- servicesRegistry.add(serviceADesc);
- servicesRegistry.add(serviceBDesc);
- servicesRegistry.add(serviceCDesc);
- servicesRegistry.add(servicePojoADesc);
-
-
- servicesRegistry.startNewServices();
-
- // Test lazy service
- Object serviceA = servicesRegistry.getService(serviceADesc.getKey());
- assertNotNull("service created", serviceA);
- assertEquals("right class", ServiceA.class, serviceA.getClass());
-
- Object serviceA2 = servicesRegistry.getService(serviceADesc.getKey());
- assertEquals("Second retrieve get the same service", serviceA, serviceA2);
-
- // test startup service
- Object serviceC = servicesRegistry.getService(serviceCDesc.getKey());
- assertNotNull("service created", serviceC);
- assertEquals("right class", ServiceC.class, serviceC.getClass());
-
- Object serviceC2 = servicesRegistry.getService(serviceCDesc.getKey());
- assertEquals("Second retrieve get the same service", serviceC, serviceC2);
-
- // test pojo service
- Object servicePojo = servicesRegistry.getService(servicePojoADesc.getKey());
- assertNotNull("service created", servicePojo);
- assertEquals("right class", ServicePojoA.class, servicePojo.getClass());
-
- Object servicePojo2 = servicesRegistry.getService(servicePojoADesc.getKey());
- assertEquals("Second retrieve get the same service", servicePojo, servicePojo2);
-
-
- }
-
- /**
- * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry#getService(java.lang.Object)}.
- *
- * @throws ServiceException
- */
- public void testGetServiceByClass() throws ServiceException {
- servicesRegistry.add(serviceADesc);
- servicesRegistry.add(serviceBDesc);
- servicesRegistry.add(serviceCDesc);
- servicesRegistry.add(servicePojoADesc);
-
-
- servicesRegistry.startNewServices();
-
- // Test lazy service
- ServiceA serviceA = servicesRegistry.getService(ServiceA.class);
- assertNotNull("service created", serviceA);
- assertEquals("right class", ServiceA.class, serviceA.getClass());
-
- ServiceA serviceA2 = servicesRegistry.getService(ServiceA.class);
- assertEquals("Second retrieve get the same service", serviceA, serviceA2);
-
- // test startup service
- ServiceC serviceC = servicesRegistry.getService(ServiceC.class);
- assertNotNull("service created", serviceC);
- assertEquals("right class", ServiceC.class, serviceC.getClass());
-
- // test pojo service
- ServicePojoA servicePojo = servicesRegistry.getService(ServicePojoA.class);
- assertNotNull("service created", servicePojo);
- assertEquals("right class", ServicePojoA.class, servicePojo.getClass());
-
- Object servicePojo2 = servicesRegistry.getService(ServicePojoA.class);
- assertEquals("Second retrieve get the same service", servicePojo, servicePojo2);
-
-
- }
-
- /**
- * Try to register 2 services under the same name, but with different priorities.
- *
- * @throws ServiceException
- */
- public void testPriority() throws ServiceException {
- servicesRegistry.add(serviceADesc);
- servicesRegistry.add(serviceA10Desc);
- servicesRegistry.add(serviceBDesc);
-
- // Test creation
- // try {
- // assertFalse("serviceA stopped", servicesRegistry.isStarted(serviceADesc.getKey()));
- // assertFalse("serviceB stopped", servicesRegistry.isStarted(serviceBDesc.getKey()));
- // } catch (ServiceNotFoundException e) {
- // fail("Service should exist.");
- // }
-
- servicesRegistry.startNewServices();
-
- Object serviceA = servicesRegistry.getService(serviceADesc.getKey());
-
- assertNotNull("Service created", serviceA);
- assertEquals("right class", ServiceA10.class, serviceA.getClass());
-
-
- }
-
- /**
- * Test add for a direct instance of service.
- *
- * @throws ServiceException
- */
- public void testAddDirectInstance() throws ServiceException {
- IService instanciatedService = new ServiceA();
- String key = instanciatedService.getClass().getName();
-
- servicesRegistry.add(key, 1, instanciatedService);
-
- servicesRegistry.add(serviceCDesc);
- servicesRegistry.add(serviceBDesc);
-
- servicesRegistry.startNewServices();
-
- Object serviceA = servicesRegistry.getService(key);
-
- assertNotNull("Service created", serviceA);
- assertEquals("right object", instanciatedService, serviceA);
- assertEquals("right class", ServiceA.class, serviceA.getClass());
-
-
- }
-
- /**
- * Test life cycle for directly registered services
- *
- * @throws ServiceException
- */
- public void testCallsOrder() throws ServiceException {
- // Register services as STARTUP !
- servicesRegistry.add(ServiceA.class, 1, new ServiceA());
- // Lazy - generate no trace
- servicesRegistry.add(ServiceB.class, 1, new ServiceB(), ServiceStartKind.LAZY);
- servicesRegistry.add(ServiceC.class, 1, new ServiceC());
- servicesRegistry.add(ServicePojoA.class, 1, new ServicePojoA());
-
-
- ServiceA.resetTrace();
- servicesRegistry.startNewServices();
-
- // Check orders
- //
- int i = 0;
- assertEquals("service", TraceKind.init, ServiceA.getEvent(i++));
- assertEquals("service", TraceKind.init, ServiceA.getEvent(i++));
- assertEquals("service", TraceKind.init, ServiceA.getEvent(i++));
- // assertEquals("service", TraceKind.init, ServiceA.getEvent(i++));
-
- assertEquals("service", TraceKind.start, ServiceA.getEvent(i++));
- assertEquals("service", TraceKind.start, ServiceA.getEvent(i++));
- assertEquals("service", TraceKind.start, ServiceA.getEvent(i++));
- // assertEquals("service", TraceKind.start, ServiceA.getEvent(i++));
-
- // Now, start lazy service
- ServiceB service = servicesRegistry.getService(ServiceB.class);
- assertNotNull("service found", service);
- assertEquals("service", TraceKind.init, ServiceA.getEvent(i++));
- assertEquals("service", TraceKind.start, ServiceA.getEvent(i++));
-
-
- // Check dispose
- servicesRegistry.disposeRegistry();
- assertEquals("service", TraceKind.dispose, ServiceA.getEvent(i++));
- assertEquals("service", TraceKind.dispose, ServiceA.getEvent(i++));
- assertEquals("service", TraceKind.dispose, ServiceA.getEvent(i++));
- // assertEquals("service", TraceKind.dispose, ServiceA.getEvent(i++));
-
- //
- }
-
- /**
- * Test life cycle for services registered wih descriptors
- *
- * @throws ServiceException
- */
- public void testCallsOrderForDescriptors() throws ServiceException {
- // Register services as STARTUP !
- // Lazy - generate no trace
- servicesRegistry.add(new LazyServiceBDescriptor());
- servicesRegistry.add(new ServiceCDescriptor());
-
-
- ServiceA.resetTrace();
- servicesRegistry.startNewServices();
-
- // Check orders
- //
- int i = 0;
- assertEquals("service", TraceKind.init, ServiceA.getEvent(i++));
- // assertEquals("service", TraceKind.init, ServiceA.getEvent(i++));
-
- assertEquals("service", TraceKind.start, ServiceA.getEvent(i++));
- // assertEquals("service", TraceKind.start, ServiceA.getEvent(i++));
-
- // Now, start lazy service
- ServiceB service = (ServiceB) servicesRegistry.getService(ServiceB.class.getName());
- assertNotNull("service found", service);
- assertEquals("service", TraceKind.init, ServiceA.getEvent(i++));
- assertEquals("service", TraceKind.start, ServiceA.getEvent(i++));
-
-
- // Check dispose
- servicesRegistry.disposeRegistry();
- assertEquals("service", TraceKind.dispose, ServiceA.getEvent(i++));
- assertEquals("service", TraceKind.dispose, ServiceA.getEvent(i++));
- // assertEquals("service", TraceKind.dispose, ServiceA.getEvent(i++));
-
- //
- }
-
- /**
- * Test the start order for services of type Start and Service
- *
- * @throws ServiceException
- */
- public void testStartDependantOrder() throws ServiceException {
-
- String A = "A";
- String B = "B";
- String C = "C";
- String D = "D";
- String E = "E";
- // String F = "F";
-
- // Create services E --> D --> C --> B --> A
- FakeService.getTrace().reset();
-
- servicesRegistry.add(new ServiceDesc(E, ServiceStartKind.STARTUP, Arrays.asList(D)));
- servicesRegistry.add(new ServiceDesc(D, ServiceStartKind.STARTUP, Arrays.asList(C)));
- servicesRegistry.add(new ServiceDesc(C, ServiceStartKind.STARTUP, Arrays.asList(B)));
- servicesRegistry.add(new ServiceDesc(B, ServiceStartKind.STARTUP, Arrays.asList(A)));
- servicesRegistry.add(new ServiceDesc(A, ServiceStartKind.STARTUP));
- // servicesRegistry.add( new ServiceIdDesc( F, ServiceStartKind.STARTUP, Arrays.asList(E) ));
-
- // Start services
- servicesRegistry.startNewServices();
-
- // check services
- assertTrue("service started", servicesRegistry.isStarted(A));
- assertTrue("service started", servicesRegistry.isStarted(B));
- assertNotSame("services are different", servicesRegistry.getService(A), servicesRegistry.getService(B));
-
- // Get names of created services
- String nameA = ((FakeService) servicesRegistry.getService(A)).getName();
- String nameB = ((FakeService) servicesRegistry.getService(B)).getName();
- String nameC = ((FakeService) servicesRegistry.getService(C)).getName();
- String nameD = ((FakeService) servicesRegistry.getService(D)).getName();
- String nameE = ((FakeService) servicesRegistry.getService(E)).getName();
- // String nameF = ((FakeService)servicesRegistry.getService(F)).getName();
-
-
- // check order (E and F order are not guaranteed)
- // order should be A, B, C, D, E
- TestTrace trace = FakeService.getTrace();
- int i = 0;
- // assertEquals("order", nameF + ",create", trace.getNameTrace(i++));
- assertEquals("order", nameA + ",create", trace.getNameTrace(i++));
- assertEquals("order", nameB + ",create", trace.getNameTrace(i++));
- assertEquals("order", nameC + ",create", trace.getNameTrace(i++));
- assertEquals("order", nameD + ",create", trace.getNameTrace(i++));
- assertEquals("order", nameE + ",create", trace.getNameTrace(i++));
-
- // assertEquals("order", nameF + ",init", trace.getNameTrace(i++));
- assertEquals("order", nameA + ",init", trace.getNameTrace(i++));
- assertEquals("order", nameB + ",init", trace.getNameTrace(i++));
- assertEquals("order", nameC + ",init", trace.getNameTrace(i++));
- assertEquals("order", nameD + ",init", trace.getNameTrace(i++));
- assertEquals("order", nameE + ",init", trace.getNameTrace(i++));
-
- // assertEquals("order", nameF + ",start", trace.getNameTrace(i++));
- assertEquals("order", nameA + ",start", trace.getNameTrace(i++));
- assertEquals("order", nameB + ",start", trace.getNameTrace(i++));
- assertEquals("order", nameC + ",start", trace.getNameTrace(i++));
- assertEquals("order", nameD + ",start", trace.getNameTrace(i++));
- assertEquals("order", nameE + ",start", trace.getNameTrace(i++));
-
- }
-
- /**
- * Start regular services, then add a new service and try to start it.
- * This should work.
- *
- * @throws ServiceException
- */
- public void testStartRegistryAndThenAddNewServiceAndStartIt() throws ServiceException {
-
- // Register some services
- String A = "A";
- String B = "B";
- String C = "C";
- servicesRegistry.add(new ServiceFactoryDesc(C, ServiceStartKind.STARTUP));
- servicesRegistry.add(new ServiceFactoryDesc(B, ServiceStartKind.STARTUP, Arrays.asList(C)));
- servicesRegistry.add(new ServiceFactoryDesc(A, ServiceStartKind.STARTUP, Arrays.asList(B)));
-
- // Start them
- servicesRegistry.startNewServices();
-
- // Register another services as pojo
- IService instanciatedService = new ServiceA();
- String key = instanciatedService.getClass().getName();
- servicesRegistry.add(key, 1, instanciatedService);
-
- // Try to start it
- servicesRegistry.startServices(key);
-
- // check services
- assertTrue("service started", servicesRegistry.isStarted(A));
- assertTrue("service started", servicesRegistry.isStarted(B));
- assertTrue("service started", servicesRegistry.isStarted(C));
-
- assertTrue("service started", servicesRegistry.isStarted(key));
-
- assertEquals("get registered service", instanciatedService, servicesRegistry.getService(key));
-
- }
-
- /**
- * Test Service Factory creation
- *
- * @throws ServiceException
- */
- public void testServiceFactoryCreation() throws ServiceException {
-
- String A = "A";
- String B = "B";
- String C = "C";
-
- // Create services
- FakeService.getTrace().reset();
-
- servicesRegistry.add(new ServiceFactoryDesc(C, ServiceStartKind.STARTUP));
- servicesRegistry.add(new ServiceFactoryDesc(B, ServiceStartKind.STARTUP, Arrays.asList(C)));
- servicesRegistry.add(new ServiceFactoryDesc(A, ServiceStartKind.STARTUP, Arrays.asList(B)));
-
- // Start services
- servicesRegistry.startNewServices();
-
- // check services
- assertSame("service type", FakeCreatedService.class, servicesRegistry.getService(A).getClass());
- assertSame("service type", FakeCreatedService.class, servicesRegistry.getService(B).getClass());
-
- // Get names of created services
- String nameA = ((FakeCreatedService) servicesRegistry.getService(A)).getName();
- String nameB = ((FakeCreatedService) servicesRegistry.getService(B)).getName();
- String nameC = ((FakeCreatedService) servicesRegistry.getService(C)).getName();
-
-
- // check order
- // Order should be: C, B, A
- TestTrace trace = FakeService.getTrace();
- int i = 0;
- assertEquals("order", nameC + ",create", trace.getNameTrace(i++));
- assertEquals("order", nameB + ",create", trace.getNameTrace(i++));
- assertEquals("order", nameA + ",create", trace.getNameTrace(i++));
-
- assertEquals("order", nameC + ",init", trace.getNameTrace(i++));
- assertEquals("order", nameB + ",init", trace.getNameTrace(i++));
- assertEquals("order", nameA + ",init", trace.getNameTrace(i++));
-
- assertEquals("order", nameC + ",start", trace.getNameTrace(i++));
- assertEquals("order", nameB + ",start", trace.getNameTrace(i++));
- assertEquals("order", nameA + ",start", trace.getNameTrace(i++));
-
- // next order is the order of getService()
- assertEquals("order", nameA + ",createInstance", trace.getNameTrace(i++));
- assertEquals("order", nameB + ",createInstance", trace.getNameTrace(i++));
- assertEquals("order", nameC + ",createInstance", trace.getNameTrace(i++));
- }
-
- /**
- * Test Creation of Service Factory used with class as key.
- *
- * @throws ServiceException
- */
- public void testServiceFactoryWithClassKey() throws ServiceException {
-
- //
- Class<?> A = ServiceA.class;
- Class<?> B = ServiceB.class;
- Class<?> C = ServiceC.class;
-
- // Specify service types as String
- String serviceClassname1 = FakeServiceFactory.class.getName();
- String serviceClassname2 = FakeServiceFactory.class.getName();
- String serviceClassname3 = FakeServiceFactory.class.getName();
-
- // Create services
- FakeService.getTrace().reset();
-
- servicesRegistry.add(new ServiceFactoryDesc(C, serviceClassname3, ServiceStartKind.STARTUP));
- servicesRegistry.add(new ServiceFactoryDesc(B, serviceClassname2, ServiceStartKind.STARTUP, Arrays.asList(C.getName())));
- servicesRegistry.add(new ServiceFactoryDesc(A, serviceClassname1, ServiceStartKind.STARTUP, Arrays.asList(B.getName())));
-
- // Start services
- servicesRegistry.startNewServices();
-
- // check services
- assertSame("service type", FakeCreatedService.class, servicesRegistry.getService(A).getClass());
- assertSame("service type", FakeCreatedService.class, servicesRegistry.getService(B).getClass());
-
- // Get names of created services
- String nameA = ((FakeCreatedService) servicesRegistry.getService(A)).getName();
- String nameB = ((FakeCreatedService) servicesRegistry.getService(B)).getName();
- String nameC = ((FakeCreatedService) servicesRegistry.getService(C)).getName();
-
-
- // check order (E and F order are not guaranteed)
- // Order should be
- TestTrace trace = FakeService.getTrace();
- int i = 0;
- assertEquals("order", nameC + ",create", trace.getNameTrace(i++));
- assertEquals("order", nameB + ",create", trace.getNameTrace(i++));
- assertEquals("order", nameA + ",create", trace.getNameTrace(i++));
-
- assertEquals("order", nameC + ",init", trace.getNameTrace(i++));
- assertEquals("order", nameB + ",init", trace.getNameTrace(i++));
- assertEquals("order", nameA + ",init", trace.getNameTrace(i++));
-
- assertEquals("order", nameC + ",start", trace.getNameTrace(i++));
- assertEquals("order", nameB + ",start", trace.getNameTrace(i++));
- assertEquals("order", nameA + ",start", trace.getNameTrace(i++));
-
- // next order is the order of getService()
- assertEquals("order", nameA + ",createInstance", trace.getNameTrace(i++));
- assertEquals("order", nameB + ",createInstance", trace.getNameTrace(i++));
- assertEquals("order", nameC + ",createInstance", trace.getNameTrace(i++));
- }
-
- /**
- * Test Service Factory creation order.
- * One of the factory try to get the required service from its init() method.
- *
- * @throws ServiceException
- */
- public void testServiceFactoryWithRequiredInInit() throws ServiceException {
-
- String A = "A";
- String B = "B";
- String C = "C";
-
- // Create services C --> A --> B
- FakeService.getTrace().reset();
-
- // FakeWithRequiredServiceFactory try to retrieve service "C"
- servicesRegistry.add(new ServiceFactoryDesc(B, FakeWithRequiredServiceFactory.class.getName(), ServiceStartKind.STARTUP, 1, Arrays.asList(C)));
- servicesRegistry.add(new ServiceFactoryDesc(A, FakeWithRequiredServiceFactory.class.getName(), ServiceStartKind.STARTUP, 1, Arrays.asList(B, C)));
- servicesRegistry.add(new ServiceFactoryDesc(C, FakeServiceFactory.class.getName(), ServiceStartKind.STARTUP, 1));
-
- // Start services
- servicesRegistry.startNewServices();
-
- // check services
- assertSame("service type", FakeCreatedService.class, servicesRegistry.getService(A).getClass());
- assertSame("service type", FakeCreatedService.class, servicesRegistry.getService(B).getClass());
-
- // Get names of created services
- String nameA = ((FakeCreatedService) servicesRegistry.getService(A)).getName();
- String nameB = ((FakeCreatedService) servicesRegistry.getService(B)).getName();
- String nameC = ((FakeCreatedService) servicesRegistry.getService(C)).getName();
-
-
- // check order
- // Order should be: C, B, A
- TestTrace trace = FakeService.getTrace();
- int i = 0;
- assertEquals("order", nameC + ",create", trace.getNameTrace(i++));
- assertEquals("order", nameB + ",create", trace.getNameTrace(i++));
- assertEquals("order", nameA + ",create", trace.getNameTrace(i++));
-
- assertEquals("order", nameC + ",init", trace.getNameTrace(i++));
- assertEquals("order", nameB + ",init", trace.getNameTrace(i++));
-
- assertEquals("order", nameC + ",createInstance", trace.getNameTrace(i++));
- assertEquals("value", servicesRegistry.getService(C), trace.getValue(i));
- assertEquals("order", nameB + ",initEnd", trace.getNameTrace(i++));
-
- assertEquals("order", nameA + ",init", trace.getNameTrace(i++));
- assertEquals("order", nameA + ",initEnd", trace.getNameTrace(i++));
-
- assertEquals("order", nameC + ",start", trace.getNameTrace(i++));
- assertEquals("order", nameB + ",start", trace.getNameTrace(i++));
- assertEquals("order", nameA + ",start", trace.getNameTrace(i++));
-
- // next order is the order of getService()
- assertEquals("order", nameA + ",createInstance", trace.getNameTrace(i++));
- // assertEquals("order", nameB + ",createInstance", trace.getNameTrace(i++));
- // assertEquals("order", nameC + ",createInstance", trace.getNameTrace(i++));
- }
-
- /**
- * Test {@link ServicesRegistry#startServicesByClassKeys(List)}.
- * Check that services are started.
- *
- * @throws ServiceException
- */
- public void testStartService() throws ServiceException {
-
- String A = "A";
- String B = "B";
- String C = "C";
- String D = "D";
- String E = "E";
-
- // Create services E --> D --> C --> B --> A
- FakeService.getTrace().reset();
-
- servicesRegistry.add(new ServiceDesc(E, ServiceStartKind.STARTUP, Arrays.asList(D)));
- servicesRegistry.add(new ServiceDesc(D, ServiceStartKind.STARTUP, Arrays.asList(C)));
- servicesRegistry.add(new ServiceDesc(C, ServiceStartKind.STARTUP, Arrays.asList(A, B)));
- servicesRegistry.add(new ServiceDesc(B, ServiceStartKind.STARTUP, Arrays.asList(A)));
- servicesRegistry.add(new ServiceDesc(A, ServiceStartKind.STARTUP));
-
- // Start services
- servicesRegistry.startServices(Arrays.asList(C));
-
- // check services
- assertTrue("service started", servicesRegistry.isStarted(A));
- assertTrue("service started", servicesRegistry.isStarted(B));
- assertTrue("service started", servicesRegistry.isStarted(C));
-
- // Get names of created services
- String nameA = ((FakeService) servicesRegistry.getService(A)).getName();
- String nameB = ((FakeService) servicesRegistry.getService(B)).getName();
- String nameC = ((FakeService) servicesRegistry.getService(C)).getName();
- // String nameD = ((FakeService)servicesRegistry.getService(D)).getName();
- // String nameE = ((FakeService)servicesRegistry.getService(E)).getName();
- // String nameF = ((FakeService)servicesRegistry.getService(F)).getName();
-
-
- // check order (E and F order are not guaranteed)
- // order should be A, B, C
- TestTrace trace = FakeService.getTrace();
- int i = 0;
- assertEquals("order", nameA + ",create", trace.getNameTrace(i++));
- assertEquals("order", nameB + ",create", trace.getNameTrace(i++));
- assertEquals("order", nameC + ",create", trace.getNameTrace(i++));
- // assertEquals("order", nameD + ",create", trace.getNameTrace(i++));
- // assertEquals("order", nameE + ",create", trace.getNameTrace(i++));
-
- assertEquals("order", nameA + ",init", trace.getNameTrace(i++));
- assertEquals("order", nameB + ",init", trace.getNameTrace(i++));
- assertEquals("order", nameC + ",init", trace.getNameTrace(i++));
- // assertEquals("order", nameD + ",init", trace.getNameTrace(i++));
- // assertEquals("order", nameE + ",init", trace.getNameTrace(i++));
-
- assertEquals("order", nameA + ",start", trace.getNameTrace(i++));
- assertEquals("order", nameB + ",start", trace.getNameTrace(i++));
- assertEquals("order", nameC + ",start", trace.getNameTrace(i++));
- // assertEquals("order", nameD + ",start", trace.getNameTrace(i++));
- // assertEquals("order", nameE + ",start", trace.getNameTrace(i++));
-
- }
-
- /* **************************************** */
-
-
-
- /**
- * Test the alias service.
- *
- * @throws ServiceException
- */
- @Test
- public void testSimpleStartServices() throws ServiceException {
-
- Class<?> serviceA = FakeServiceA.class;
- Class<?> serviceB = FakeServiceB.class;
- Class<?> serviceC = FakeServiceC.class;
-
- // services A --> B
- FakeService.getTrace().reset();
-
- // Create an alias to B
- ServicesRegistry registryA = new ServicesRegistry();
- registryA.add(new ServiceDescriptor(serviceA.getName(), ServiceStartKind.STARTUP, 1, Arrays.asList(serviceB.getName())));
- registryA.add(new ServiceDescriptor(serviceB.getName(), ServiceStartKind.STARTUP, 1));
- registryA.add(new ServiceDescriptor(serviceC.getName(), ServiceStartKind.STARTUP, 1));
-
- registryA.startNewServices();
-
-
- // check services
- assertNotNull("got service started", registryA.getService(serviceB));
- assertNotNull("got service started", registryA.getService(serviceC));
- assertNotNull("got service started", registryA.getService(serviceA));
-
- }
-
- /**
- * Test the alias service.
- *
- * @throws ServiceException
- */
- @Test
- public void testChainWithLazyStartServices() throws ServiceException {
-
- Class<?> serviceA = FakeServiceA.class;
- Class<?> serviceB = FakeServiceB.class;
- Class<?> serviceC = FakeServiceC.class;
-
- FakeService.getTrace().reset();
-
- // services A --> B (lazy) --> C
- ServicesRegistry registryA = new ServicesRegistry();
- registryA.add(new ServiceDescriptor(serviceA.getName(), ServiceStartKind.STARTUP, 1, Arrays.asList(serviceB.getName())));
- registryA.add(new ServiceDescriptor(serviceB.getName(), ServiceStartKind.LAZY, 1, Arrays.asList(serviceC.getName())));
- registryA.add(new ServiceDescriptor(serviceC.getName(), ServiceStartKind.STARTUP, 1));
-
- FakeService.getTrace().reset();
- registryA.startNewServices();
-
-
- // check services
- // A and C should be started, B should not be started.
- assertTrue("A started", registryA.isStarted(serviceA));
- assertFalse("B not started", registryA.isStarted(serviceB));
- assertTrue("C started", registryA.isStarted(serviceC));
-
- // Check if we can get them
- assertNotNull("got service started", registryA.getService(serviceC));
- assertNotNull("got service started", registryA.getService(serviceA));
-
- // check creation order (C then A)
- // order should be C, A
- TestTrace trace = FakeService.getTrace();
- int i = 0;
- assertEquals("order", serviceC.getSimpleName() + ",create", trace.getNameTrace(i++));
- assertEquals("order", serviceA.getSimpleName() + ",create", trace.getNameTrace(i++));
-
- assertEquals("order", serviceC.getSimpleName() + ",init", trace.getNameTrace(i++));
- assertEquals("order", serviceA.getSimpleName() + ",init", trace.getNameTrace(i++));
-
- assertEquals("order", serviceC.getSimpleName() + ",start", trace.getNameTrace(i++));
- assertEquals("order", serviceA.getSimpleName() + ",start", trace.getNameTrace(i++));
-
- // start B
- assertNotNull("got service started", registryA.getService(serviceB));
- assertTrue("B started", registryA.isStarted(serviceB));
-
-
- }
-
-
-
- /**
- * Test the alias service.
- *
- * @throws ServiceException
- */
- @Test
- public void testAliasServices() throws ServiceException {
-
- Class<?> serviceA = FakeServiceA.class;
- Class<?> serviceB = FakeServiceB.class;
- Class<?> serviceC = FakeServiceC.class;
-
- String aliasService2 = "AnAlias";
-
- // services A --> B
- FakeService.getTrace().reset();
-
- // Create an alias to B
- ServicesRegistry registryA = new ServicesRegistry();
- registryA.add(new AliasDescriptor(serviceA.getName(), serviceB.getName(), 1));
- registryA.add(new AliasDescriptor(aliasService2, serviceC.getName(), 1));
- registryA.add(new ServiceDescriptor(serviceB, serviceB.getName(), ServiceStartKind.STARTUP, 1));
- registryA.add(new ServiceDescriptor(serviceC.getName(), ServiceStartKind.STARTUP, 1));
-
- registryA.startNewServices();
-
-
- // check services
- assertNotNull("got service started", registryA.getService(serviceB));
- assertNotNull("got service started", registryA.getService(serviceC));
- assertNotNull("got service started", registryA.getService(serviceA));
- assertNotNull("got service started", registryA.getService(aliasService2));
-
- assertEquals("Got the same service", registryA.getService(serviceA), registryA.getService(serviceB));
- assertEquals("Got the same service", registryA.getService(serviceC), registryA.getService(aliasService2));
-
- }
-
- /**
- * General purpose descriptor.
- *
- * @deprecated use {@link FakeServiceDescriptor}
- */
- @Deprecated
- public class ServiceDesc extends ServiceDescriptor {
-
-
- public ServiceDesc(String key, ServiceStartKind startKind) {
- super(key, FakeService.class.getName(), startKind, 1);
- }
-
- public ServiceDesc(String key, ServiceStartKind startKind, List<String> requiredService) {
- super(key, FakeService.class.getName(), startKind, 1, requiredService);
- }
- }
-
- /**
- * General purpose descriptor.
- */
- public class ServiceFactoryDesc extends ServiceDescriptor {
-
-
- public ServiceFactoryDesc(String key, ServiceStartKind startKind) {
- super(key, FakeServiceFactory.class.getName(), startKind, 1);
- setServiceTypeKind(ServiceTypeKind.serviceFactory);
- }
-
- public ServiceFactoryDesc(String key, ServiceStartKind startKind, List<String> requiredService) {
- super(key, FakeServiceFactory.class.getName(), startKind, 1, requiredService);
- setServiceTypeKind(ServiceTypeKind.serviceFactory);
- }
-
- /**
- * Constructor with a classname and {@link ServiceDescriptor#isStartAtStartup()} = true.
- * Constructor.
- *
- * @param key
- * @param startKind
- * @param requiredService
- */
- public ServiceFactoryDesc(Class<?> key, String classname, ServiceStartKind startKind, List<String> requiredService) {
- super(key, classname, startKind, 1, requiredService);
- setServiceTypeKind(ServiceTypeKind.serviceFactory);
- }
-
- /**
- * Constructor with a classname and {@link ServiceDescriptor#isStartAtStartup()} = true.
- * Constructor.
- *
- * @param key
- * @param startKind
- * @param requiredService
- */
- public ServiceFactoryDesc(Class<?> key, String classname, ServiceStartKind startKind) {
- super(key, classname, startKind, 1);
- setServiceTypeKind(ServiceTypeKind.serviceFactory);
- }
-
- public ServiceFactoryDesc(String key, String serviceClassname, ServiceStartKind serviceStartKind, int priority, List<String> requiredServices) {
- super(key, serviceClassname, serviceStartKind, priority, requiredServices);
- setServiceTypeKind(ServiceTypeKind.serviceFactory);
- }
-
- public ServiceFactoryDesc(String key, String serviceClassname, ServiceStartKind serviceStartKind, int priority) {
- super(key, serviceClassname, serviceStartKind, priority);
- setServiceTypeKind(ServiceTypeKind.serviceFactory);
- }
- }
-
- /**
- *
- * @author dumoulin
- *
- */
- public class LazyServiceADescriptor extends ServiceDescriptor {
-
-
- public LazyServiceADescriptor() {
- super(ServiceA.class.getName(), ServiceStartKind.LAZY, 1);
- }
- }
-
- public class LazyServiceA10Descriptor extends ServiceDescriptor {
-
-
- public LazyServiceA10Descriptor() {
- super(ServiceA.class.getName(), ServiceA10.class.getName(), ServiceStartKind.LAZY, 10);
- }
- }
-
- public class LazyServiceBDescriptor extends ServiceDescriptor {
-
-
- public LazyServiceBDescriptor() {
- super(ServiceB.class.getName(), ServiceStartKind.LAZY, 1);
- }
- }
-
- public class ServiceCDescriptor extends ServiceDescriptor {
-
-
- public ServiceCDescriptor() {
- super(ServiceC.class.getName(), ServiceStartKind.STARTUP, 1);
- }
- }
-
- public class LazyServicePojoADescriptor extends ServiceDescriptor {
-
-
- public LazyServicePojoADescriptor() {
- super(ServicePojoA.class.getName(), ServiceStartKind.LAZY, 1);
- }
- }
-
- public class PojoServiceDescriptor extends ServiceDescriptor {
-
-
- public PojoServiceDescriptor() {
- super(Object.class.getName(), ServiceStartKind.STARTUP, 1);
- }
- }
-
-
-}
+/** + * + */ +package org.eclipse.papyrus.infra.core.serviceregistry; + +import java.util.Arrays; +import java.util.List; + +import junit.framework.TestCase; + +import org.eclipse.papyrus.infra.core.serviceregistry.FakeServiceFactory.FakeCreatedService; +import org.eclipse.papyrus.infra.core.serviceregistry.ServiceA.TraceKind; +import org.junit.Test; + + +/** + * @author dumoulin + * + */ +public class ServicesRegistryTest extends TestCase { + + /** The registry to test */ + ServicesRegistry servicesRegistry; + + ServiceDescriptor serviceADesc = new LazyServiceADescriptor(); + + ServiceDescriptor serviceA10Desc = new LazyServiceA10Descriptor(); + + ServiceDescriptor serviceBDesc = new LazyServiceBDescriptor(); + + ServiceDescriptor serviceCDesc = new ServiceCDescriptor(); + + ServiceDescriptor servicePojoADesc = new LazyServicePojoADescriptor(); + + public ServicesRegistryTest(String name) { + super(name); + } + + /** + * @throws java.lang.Exception + */ + @Override + protected void setUp() throws Exception { + servicesRegistry = new ServicesRegistry(); + } + + /** + * @throws java.lang.Exception + */ + @Override + protected void tearDown() throws Exception { + } + + /** + * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry#add(org.eclipse.papyrus.infra.core.serviceregistry.ServiceDescriptor)} . + * + * @throws ServiceMultiException + */ + public void testAdd() throws ServiceMultiException { + + servicesRegistry.add(serviceADesc); + servicesRegistry.add(serviceBDesc); + servicesRegistry.add(serviceCDesc); + servicesRegistry.add(servicePojoADesc); + + // Test entries creation + // try { + // assertFalse("serviceA stopped", servicesRegistry.isStarted(serviceADesc.getKey())); + // assertFalse("serviceB stopped", servicesRegistry.isStarted(serviceBDesc.getKey())); + // assertFalse("serviceC stopped", servicesRegistry.isStarted(serviceCDesc.getKey())); + // assertFalse("servicePojoA stopped", servicesRegistry.isStarted(servicePojoADesc.getKey())); + // } catch (ServiceNotFoundException e) { + // fail("Service should exist." + e.getMessage()); + // } + + // Test startup + servicesRegistry.startNewServices(); + + // Test always started + try { + assertFalse("serviceA stopped", servicesRegistry.isStarted(serviceADesc.getKey())); + assertFalse("serviceB stopped", servicesRegistry.isStarted(serviceBDesc.getKey())); + assertEquals("serviceC state", ServiceState.started, servicesRegistry.serviceState(serviceCDesc.getKey())); + assertTrue("serviceC started", servicesRegistry.isStarted(serviceCDesc.getKey())); + assertFalse("servicePojoA stopped", servicesRegistry.isStarted(servicePojoADesc.getKey())); + } catch (ServiceNotFoundException e) { + fail("Service should exist."); + } + + + } + + /** + * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry#getService(java.lang.Object)}. + * + * @throws ServiceException + */ + public void testGetService() throws ServiceException { + servicesRegistry.add(serviceADesc); + servicesRegistry.add(serviceBDesc); + servicesRegistry.add(serviceCDesc); + servicesRegistry.add(servicePojoADesc); + + + servicesRegistry.startNewServices(); + + // Test lazy service + Object serviceA = servicesRegistry.getService(serviceADesc.getKey()); + assertNotNull("service created", serviceA); + assertEquals("right class", ServiceA.class, serviceA.getClass()); + + Object serviceA2 = servicesRegistry.getService(serviceADesc.getKey()); + assertEquals("Second retrieve get the same service", serviceA, serviceA2); + + // test startup service + Object serviceC = servicesRegistry.getService(serviceCDesc.getKey()); + assertNotNull("service created", serviceC); + assertEquals("right class", ServiceC.class, serviceC.getClass()); + + Object serviceC2 = servicesRegistry.getService(serviceCDesc.getKey()); + assertEquals("Second retrieve get the same service", serviceC, serviceC2); + + // test pojo service + Object servicePojo = servicesRegistry.getService(servicePojoADesc.getKey()); + assertNotNull("service created", servicePojo); + assertEquals("right class", ServicePojoA.class, servicePojo.getClass()); + + Object servicePojo2 = servicesRegistry.getService(servicePojoADesc.getKey()); + assertEquals("Second retrieve get the same service", servicePojo, servicePojo2); + + + } + + /** + * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry#getService(java.lang.Object)}. + * + * @throws ServiceException + */ + public void testGetServiceByClass() throws ServiceException { + servicesRegistry.add(serviceADesc); + servicesRegistry.add(serviceBDesc); + servicesRegistry.add(serviceCDesc); + servicesRegistry.add(servicePojoADesc); + + + servicesRegistry.startNewServices(); + + // Test lazy service + ServiceA serviceA = servicesRegistry.getService(ServiceA.class); + assertNotNull("service created", serviceA); + assertEquals("right class", ServiceA.class, serviceA.getClass()); + + ServiceA serviceA2 = servicesRegistry.getService(ServiceA.class); + assertEquals("Second retrieve get the same service", serviceA, serviceA2); + + // test startup service + ServiceC serviceC = servicesRegistry.getService(ServiceC.class); + assertNotNull("service created", serviceC); + assertEquals("right class", ServiceC.class, serviceC.getClass()); + + // test pojo service + ServicePojoA servicePojo = servicesRegistry.getService(ServicePojoA.class); + assertNotNull("service created", servicePojo); + assertEquals("right class", ServicePojoA.class, servicePojo.getClass()); + + Object servicePojo2 = servicesRegistry.getService(ServicePojoA.class); + assertEquals("Second retrieve get the same service", servicePojo, servicePojo2); + + + } + + /** + * Try to register 2 services under the same name, but with different priorities. + * + * @throws ServiceException + */ + public void testPriority() throws ServiceException { + servicesRegistry.add(serviceADesc); + servicesRegistry.add(serviceA10Desc); + servicesRegistry.add(serviceBDesc); + + // Test creation + // try { + // assertFalse("serviceA stopped", servicesRegistry.isStarted(serviceADesc.getKey())); + // assertFalse("serviceB stopped", servicesRegistry.isStarted(serviceBDesc.getKey())); + // } catch (ServiceNotFoundException e) { + // fail("Service should exist."); + // } + + servicesRegistry.startNewServices(); + + Object serviceA = servicesRegistry.getService(serviceADesc.getKey()); + + assertNotNull("Service created", serviceA); + assertEquals("right class", ServiceA10.class, serviceA.getClass()); + + + } + + /** + * Test add for a direct instance of service. + * + * @throws ServiceException + */ + public void testAddDirectInstance() throws ServiceException { + IService instanciatedService = new ServiceA(); + String key = instanciatedService.getClass().getName(); + + servicesRegistry.add(key, 1, instanciatedService); + + servicesRegistry.add(serviceCDesc); + servicesRegistry.add(serviceBDesc); + + servicesRegistry.startNewServices(); + + Object serviceA = servicesRegistry.getService(key); + + assertNotNull("Service created", serviceA); + assertEquals("right object", instanciatedService, serviceA); + assertEquals("right class", ServiceA.class, serviceA.getClass()); + + + } + + /** + * Test life cycle for directly registered services + * + * @throws ServiceException + */ + public void testCallsOrder() throws ServiceException { + // Register services as STARTUP ! + servicesRegistry.add(ServiceA.class, 1, new ServiceA()); + // Lazy - generate no trace + servicesRegistry.add(ServiceB.class, 1, new ServiceB(), ServiceStartKind.LAZY); + servicesRegistry.add(ServiceC.class, 1, new ServiceC()); + servicesRegistry.add(ServicePojoA.class, 1, new ServicePojoA()); + + + ServiceA.resetTrace(); + servicesRegistry.startNewServices(); + + // Check orders + // + int i = 0; + assertEquals("service", TraceKind.init, ServiceA.getEvent(i++)); + assertEquals("service", TraceKind.init, ServiceA.getEvent(i++)); + assertEquals("service", TraceKind.init, ServiceA.getEvent(i++)); + // assertEquals("service", TraceKind.init, ServiceA.getEvent(i++)); + + assertEquals("service", TraceKind.start, ServiceA.getEvent(i++)); + assertEquals("service", TraceKind.start, ServiceA.getEvent(i++)); + assertEquals("service", TraceKind.start, ServiceA.getEvent(i++)); + // assertEquals("service", TraceKind.start, ServiceA.getEvent(i++)); + + // Now, start lazy service + ServiceB service = servicesRegistry.getService(ServiceB.class); + assertNotNull("service found", service); + assertEquals("service", TraceKind.init, ServiceA.getEvent(i++)); + assertEquals("service", TraceKind.start, ServiceA.getEvent(i++)); + + + // Check dispose + servicesRegistry.disposeRegistry(); + assertEquals("service", TraceKind.dispose, ServiceA.getEvent(i++)); + assertEquals("service", TraceKind.dispose, ServiceA.getEvent(i++)); + assertEquals("service", TraceKind.dispose, ServiceA.getEvent(i++)); + // assertEquals("service", TraceKind.dispose, ServiceA.getEvent(i++)); + + // + } + + /** + * Test life cycle for services registered wih descriptors + * + * @throws ServiceException + */ + public void testCallsOrderForDescriptors() throws ServiceException { + // Register services as STARTUP ! + // Lazy - generate no trace + servicesRegistry.add(new LazyServiceBDescriptor()); + servicesRegistry.add(new ServiceCDescriptor()); + + + ServiceA.resetTrace(); + servicesRegistry.startNewServices(); + + // Check orders + // + int i = 0; + assertEquals("service", TraceKind.init, ServiceA.getEvent(i++)); + // assertEquals("service", TraceKind.init, ServiceA.getEvent(i++)); + + assertEquals("service", TraceKind.start, ServiceA.getEvent(i++)); + // assertEquals("service", TraceKind.start, ServiceA.getEvent(i++)); + + // Now, start lazy service + ServiceB service = (ServiceB) servicesRegistry.getService(ServiceB.class.getName()); + assertNotNull("service found", service); + assertEquals("service", TraceKind.init, ServiceA.getEvent(i++)); + assertEquals("service", TraceKind.start, ServiceA.getEvent(i++)); + + + // Check dispose + servicesRegistry.disposeRegistry(); + assertEquals("service", TraceKind.dispose, ServiceA.getEvent(i++)); + assertEquals("service", TraceKind.dispose, ServiceA.getEvent(i++)); + // assertEquals("service", TraceKind.dispose, ServiceA.getEvent(i++)); + + // + } + + /** + * Test the start order for services of type Start and Service + * + * @throws ServiceException + */ + public void testStartDependantOrder() throws ServiceException { + + String A = "A"; + String B = "B"; + String C = "C"; + String D = "D"; + String E = "E"; + // String F = "F"; + + // Create services E --> D --> C --> B --> A + FakeService.getTrace().reset(); + + servicesRegistry.add(new ServiceDesc(E, ServiceStartKind.STARTUP, Arrays.asList(D))); + servicesRegistry.add(new ServiceDesc(D, ServiceStartKind.STARTUP, Arrays.asList(C))); + servicesRegistry.add(new ServiceDesc(C, ServiceStartKind.STARTUP, Arrays.asList(B))); + servicesRegistry.add(new ServiceDesc(B, ServiceStartKind.STARTUP, Arrays.asList(A))); + servicesRegistry.add(new ServiceDesc(A, ServiceStartKind.STARTUP)); + // servicesRegistry.add( new ServiceIdDesc( F, ServiceStartKind.STARTUP, Arrays.asList(E) )); + + // Start services + servicesRegistry.startNewServices(); + + // check services + assertTrue("service started", servicesRegistry.isStarted(A)); + assertTrue("service started", servicesRegistry.isStarted(B)); + assertNotSame("services are different", servicesRegistry.getService(A), servicesRegistry.getService(B)); + + // Get names of created services + String nameA = ((FakeService) servicesRegistry.getService(A)).getName(); + String nameB = ((FakeService) servicesRegistry.getService(B)).getName(); + String nameC = ((FakeService) servicesRegistry.getService(C)).getName(); + String nameD = ((FakeService) servicesRegistry.getService(D)).getName(); + String nameE = ((FakeService) servicesRegistry.getService(E)).getName(); + // String nameF = ((FakeService)servicesRegistry.getService(F)).getName(); + + + // check order (E and F order are not guaranteed) + // order should be A, B, C, D, E + TestTrace trace = FakeService.getTrace(); + int i = 0; + // assertEquals("order", nameF + ",create", trace.getNameTrace(i++)); + assertEquals("order", nameA + ",create", trace.getNameTrace(i++)); + assertEquals("order", nameB + ",create", trace.getNameTrace(i++)); + assertEquals("order", nameC + ",create", trace.getNameTrace(i++)); + assertEquals("order", nameD + ",create", trace.getNameTrace(i++)); + assertEquals("order", nameE + ",create", trace.getNameTrace(i++)); + + // assertEquals("order", nameF + ",init", trace.getNameTrace(i++)); + assertEquals("order", nameA + ",init", trace.getNameTrace(i++)); + assertEquals("order", nameB + ",init", trace.getNameTrace(i++)); + assertEquals("order", nameC + ",init", trace.getNameTrace(i++)); + assertEquals("order", nameD + ",init", trace.getNameTrace(i++)); + assertEquals("order", nameE + ",init", trace.getNameTrace(i++)); + + // assertEquals("order", nameF + ",start", trace.getNameTrace(i++)); + assertEquals("order", nameA + ",start", trace.getNameTrace(i++)); + assertEquals("order", nameB + ",start", trace.getNameTrace(i++)); + assertEquals("order", nameC + ",start", trace.getNameTrace(i++)); + assertEquals("order", nameD + ",start", trace.getNameTrace(i++)); + assertEquals("order", nameE + ",start", trace.getNameTrace(i++)); + + } + + /** + * Start regular services, then add a new service and try to start it. + * This should work. + * + * @throws ServiceException + */ + public void testStartRegistryAndThenAddNewServiceAndStartIt() throws ServiceException { + + // Register some services + String A = "A"; + String B = "B"; + String C = "C"; + servicesRegistry.add(new ServiceFactoryDesc(C, ServiceStartKind.STARTUP)); + servicesRegistry.add(new ServiceFactoryDesc(B, ServiceStartKind.STARTUP, Arrays.asList(C))); + servicesRegistry.add(new ServiceFactoryDesc(A, ServiceStartKind.STARTUP, Arrays.asList(B))); + + // Start them + servicesRegistry.startNewServices(); + + // Register another services as pojo + IService instanciatedService = new ServiceA(); + String key = instanciatedService.getClass().getName(); + servicesRegistry.add(key, 1, instanciatedService); + + // Try to start it + servicesRegistry.startServices(key); + + // check services + assertTrue("service started", servicesRegistry.isStarted(A)); + assertTrue("service started", servicesRegistry.isStarted(B)); + assertTrue("service started", servicesRegistry.isStarted(C)); + + assertTrue("service started", servicesRegistry.isStarted(key)); + + assertEquals("get registered service", instanciatedService, servicesRegistry.getService(key)); + + } + + /** + * Test Service Factory creation + * + * @throws ServiceException + */ + public void testServiceFactoryCreation() throws ServiceException { + + String A = "A"; + String B = "B"; + String C = "C"; + + // Create services + FakeService.getTrace().reset(); + + servicesRegistry.add(new ServiceFactoryDesc(C, ServiceStartKind.STARTUP)); + servicesRegistry.add(new ServiceFactoryDesc(B, ServiceStartKind.STARTUP, Arrays.asList(C))); + servicesRegistry.add(new ServiceFactoryDesc(A, ServiceStartKind.STARTUP, Arrays.asList(B))); + + // Start services + servicesRegistry.startNewServices(); + + // check services + assertSame("service type", FakeCreatedService.class, servicesRegistry.getService(A).getClass()); + assertSame("service type", FakeCreatedService.class, servicesRegistry.getService(B).getClass()); + + // Get names of created services + String nameA = ((FakeCreatedService) servicesRegistry.getService(A)).getName(); + String nameB = ((FakeCreatedService) servicesRegistry.getService(B)).getName(); + String nameC = ((FakeCreatedService) servicesRegistry.getService(C)).getName(); + + + // check order + // Order should be: C, B, A + TestTrace trace = FakeService.getTrace(); + int i = 0; + assertEquals("order", nameC + ",create", trace.getNameTrace(i++)); + assertEquals("order", nameB + ",create", trace.getNameTrace(i++)); + assertEquals("order", nameA + ",create", trace.getNameTrace(i++)); + + assertEquals("order", nameC + ",init", trace.getNameTrace(i++)); + assertEquals("order", nameB + ",init", trace.getNameTrace(i++)); + assertEquals("order", nameA + ",init", trace.getNameTrace(i++)); + + assertEquals("order", nameC + ",start", trace.getNameTrace(i++)); + assertEquals("order", nameB + ",start", trace.getNameTrace(i++)); + assertEquals("order", nameA + ",start", trace.getNameTrace(i++)); + + // next order is the order of getService() + assertEquals("order", nameA + ",createInstance", trace.getNameTrace(i++)); + assertEquals("order", nameB + ",createInstance", trace.getNameTrace(i++)); + assertEquals("order", nameC + ",createInstance", trace.getNameTrace(i++)); + } + + /** + * Test Creation of Service Factory used with class as key. + * + * @throws ServiceException + */ + public void testServiceFactoryWithClassKey() throws ServiceException { + + // + Class<?> A = ServiceA.class; + Class<?> B = ServiceB.class; + Class<?> C = ServiceC.class; + + // Specify service types as String + String serviceClassname1 = FakeServiceFactory.class.getName(); + String serviceClassname2 = FakeServiceFactory.class.getName(); + String serviceClassname3 = FakeServiceFactory.class.getName(); + + // Create services + FakeService.getTrace().reset(); + + servicesRegistry.add(new ServiceFactoryDesc(C, serviceClassname3, ServiceStartKind.STARTUP)); + servicesRegistry.add(new ServiceFactoryDesc(B, serviceClassname2, ServiceStartKind.STARTUP, Arrays.asList(C.getName()))); + servicesRegistry.add(new ServiceFactoryDesc(A, serviceClassname1, ServiceStartKind.STARTUP, Arrays.asList(B.getName()))); + + // Start services + servicesRegistry.startNewServices(); + + // check services + assertSame("service type", FakeCreatedService.class, servicesRegistry.getService(A).getClass()); + assertSame("service type", FakeCreatedService.class, servicesRegistry.getService(B).getClass()); + + // Get names of created services + String nameA = ((FakeCreatedService) servicesRegistry.getService(A)).getName(); + String nameB = ((FakeCreatedService) servicesRegistry.getService(B)).getName(); + String nameC = ((FakeCreatedService) servicesRegistry.getService(C)).getName(); + + + // check order (E and F order are not guaranteed) + // Order should be + TestTrace trace = FakeService.getTrace(); + int i = 0; + assertEquals("order", nameC + ",create", trace.getNameTrace(i++)); + assertEquals("order", nameB + ",create", trace.getNameTrace(i++)); + assertEquals("order", nameA + ",create", trace.getNameTrace(i++)); + + assertEquals("order", nameC + ",init", trace.getNameTrace(i++)); + assertEquals("order", nameB + ",init", trace.getNameTrace(i++)); + assertEquals("order", nameA + ",init", trace.getNameTrace(i++)); + + assertEquals("order", nameC + ",start", trace.getNameTrace(i++)); + assertEquals("order", nameB + ",start", trace.getNameTrace(i++)); + assertEquals("order", nameA + ",start", trace.getNameTrace(i++)); + + // next order is the order of getService() + assertEquals("order", nameA + ",createInstance", trace.getNameTrace(i++)); + assertEquals("order", nameB + ",createInstance", trace.getNameTrace(i++)); + assertEquals("order", nameC + ",createInstance", trace.getNameTrace(i++)); + } + + /** + * Test Service Factory creation order. + * One of the factory try to get the required service from its init() method. + * + * @throws ServiceException + */ + public void testServiceFactoryWithRequiredInInit() throws ServiceException { + + String A = "A"; + String B = "B"; + String C = "C"; + + // Create services C --> A --> B + FakeService.getTrace().reset(); + + // FakeWithRequiredServiceFactory try to retrieve service "C" + servicesRegistry.add(new ServiceFactoryDesc(B, FakeWithRequiredServiceFactory.class.getName(), ServiceStartKind.STARTUP, 1, Arrays.asList(C))); + servicesRegistry.add(new ServiceFactoryDesc(A, FakeWithRequiredServiceFactory.class.getName(), ServiceStartKind.STARTUP, 1, Arrays.asList(B, C))); + servicesRegistry.add(new ServiceFactoryDesc(C, FakeServiceFactory.class.getName(), ServiceStartKind.STARTUP, 1)); + + // Start services + servicesRegistry.startNewServices(); + + // check services + assertSame("service type", FakeCreatedService.class, servicesRegistry.getService(A).getClass()); + assertSame("service type", FakeCreatedService.class, servicesRegistry.getService(B).getClass()); + + // Get names of created services + String nameA = ((FakeCreatedService) servicesRegistry.getService(A)).getName(); + String nameB = ((FakeCreatedService) servicesRegistry.getService(B)).getName(); + String nameC = ((FakeCreatedService) servicesRegistry.getService(C)).getName(); + + + // check order + // Order should be: C, B, A + TestTrace trace = FakeService.getTrace(); + int i = 0; + assertEquals("order", nameC + ",create", trace.getNameTrace(i++)); + assertEquals("order", nameB + ",create", trace.getNameTrace(i++)); + assertEquals("order", nameA + ",create", trace.getNameTrace(i++)); + + assertEquals("order", nameC + ",init", trace.getNameTrace(i++)); + assertEquals("order", nameB + ",init", trace.getNameTrace(i++)); + + assertEquals("order", nameC + ",createInstance", trace.getNameTrace(i++)); + assertEquals("value", servicesRegistry.getService(C), trace.getValue(i)); + assertEquals("order", nameB + ",initEnd", trace.getNameTrace(i++)); + + assertEquals("order", nameA + ",init", trace.getNameTrace(i++)); + assertEquals("order", nameA + ",initEnd", trace.getNameTrace(i++)); + + assertEquals("order", nameC + ",start", trace.getNameTrace(i++)); + assertEquals("order", nameB + ",start", trace.getNameTrace(i++)); + assertEquals("order", nameA + ",start", trace.getNameTrace(i++)); + + // next order is the order of getService() + assertEquals("order", nameA + ",createInstance", trace.getNameTrace(i++)); + // assertEquals("order", nameB + ",createInstance", trace.getNameTrace(i++)); + // assertEquals("order", nameC + ",createInstance", trace.getNameTrace(i++)); + } + + /** + * Test {@link ServicesRegistry#startServicesByClassKeys(List)}. + * Check that services are started. + * + * @throws ServiceException + */ + public void testStartService() throws ServiceException { + + String A = "A"; + String B = "B"; + String C = "C"; + String D = "D"; + String E = "E"; + + // Create services E --> D --> C --> B --> A + FakeService.getTrace().reset(); + + servicesRegistry.add(new ServiceDesc(E, ServiceStartKind.STARTUP, Arrays.asList(D))); + servicesRegistry.add(new ServiceDesc(D, ServiceStartKind.STARTUP, Arrays.asList(C))); + servicesRegistry.add(new ServiceDesc(C, ServiceStartKind.STARTUP, Arrays.asList(A, B))); + servicesRegistry.add(new ServiceDesc(B, ServiceStartKind.STARTUP, Arrays.asList(A))); + servicesRegistry.add(new ServiceDesc(A, ServiceStartKind.STARTUP)); + + // Start services + servicesRegistry.startServices(Arrays.asList(C)); + + // check services + assertTrue("service started", servicesRegistry.isStarted(A)); + assertTrue("service started", servicesRegistry.isStarted(B)); + assertTrue("service started", servicesRegistry.isStarted(C)); + + // Get names of created services + String nameA = ((FakeService) servicesRegistry.getService(A)).getName(); + String nameB = ((FakeService) servicesRegistry.getService(B)).getName(); + String nameC = ((FakeService) servicesRegistry.getService(C)).getName(); + // String nameD = ((FakeService)servicesRegistry.getService(D)).getName(); + // String nameE = ((FakeService)servicesRegistry.getService(E)).getName(); + // String nameF = ((FakeService)servicesRegistry.getService(F)).getName(); + + + // check order (E and F order are not guaranteed) + // order should be A, B, C + TestTrace trace = FakeService.getTrace(); + int i = 0; + assertEquals("order", nameA + ",create", trace.getNameTrace(i++)); + assertEquals("order", nameB + ",create", trace.getNameTrace(i++)); + assertEquals("order", nameC + ",create", trace.getNameTrace(i++)); + // assertEquals("order", nameD + ",create", trace.getNameTrace(i++)); + // assertEquals("order", nameE + ",create", trace.getNameTrace(i++)); + + assertEquals("order", nameA + ",init", trace.getNameTrace(i++)); + assertEquals("order", nameB + ",init", trace.getNameTrace(i++)); + assertEquals("order", nameC + ",init", trace.getNameTrace(i++)); + // assertEquals("order", nameD + ",init", trace.getNameTrace(i++)); + // assertEquals("order", nameE + ",init", trace.getNameTrace(i++)); + + assertEquals("order", nameA + ",start", trace.getNameTrace(i++)); + assertEquals("order", nameB + ",start", trace.getNameTrace(i++)); + assertEquals("order", nameC + ",start", trace.getNameTrace(i++)); + // assertEquals("order", nameD + ",start", trace.getNameTrace(i++)); + // assertEquals("order", nameE + ",start", trace.getNameTrace(i++)); + + } + + /* **************************************** */ + + + + /** + * Test the alias service. + * + * @throws ServiceException + */ + @Test + public void testSimpleStartServices() throws ServiceException { + + Class<?> serviceA = FakeServiceA.class; + Class<?> serviceB = FakeServiceB.class; + Class<?> serviceC = FakeServiceC.class; + + // services A --> B + FakeService.getTrace().reset(); + + // Create an alias to B + ServicesRegistry registryA = new ServicesRegistry(); + registryA.add(new ServiceDescriptor(serviceA.getName(), ServiceStartKind.STARTUP, 1, Arrays.asList(serviceB.getName()))); + registryA.add(new ServiceDescriptor(serviceB.getName(), ServiceStartKind.STARTUP, 1)); + registryA.add(new ServiceDescriptor(serviceC.getName(), ServiceStartKind.STARTUP, 1)); + + registryA.startNewServices(); + + + // check services + assertNotNull("got service started", registryA.getService(serviceB)); + assertNotNull("got service started", registryA.getService(serviceC)); + assertNotNull("got service started", registryA.getService(serviceA)); + + } + + /** + * Test the alias service. + * + * @throws ServiceException + */ + @Test + public void testChainWithLazyStartServices() throws ServiceException { + + Class<?> serviceA = FakeServiceA.class; + Class<?> serviceB = FakeServiceB.class; + Class<?> serviceC = FakeServiceC.class; + + FakeService.getTrace().reset(); + + // services A --> B (lazy) --> C + ServicesRegistry registryA = new ServicesRegistry(); + registryA.add(new ServiceDescriptor(serviceA.getName(), ServiceStartKind.STARTUP, 1, Arrays.asList(serviceB.getName()))); + registryA.add(new ServiceDescriptor(serviceB.getName(), ServiceStartKind.LAZY, 1, Arrays.asList(serviceC.getName()))); + registryA.add(new ServiceDescriptor(serviceC.getName(), ServiceStartKind.STARTUP, 1)); + + FakeService.getTrace().reset(); + registryA.startNewServices(); + + + // check services + // A and C should be started, B should not be started. + assertTrue("A started", registryA.isStarted(serviceA)); + assertFalse("B not started", registryA.isStarted(serviceB)); + assertTrue("C started", registryA.isStarted(serviceC)); + + // Check if we can get them + assertNotNull("got service started", registryA.getService(serviceC)); + assertNotNull("got service started", registryA.getService(serviceA)); + + // check creation order (C then A) + // order should be C, A + TestTrace trace = FakeService.getTrace(); + int i = 0; + assertEquals("order", serviceC.getSimpleName() + ",create", trace.getNameTrace(i++)); + assertEquals("order", serviceA.getSimpleName() + ",create", trace.getNameTrace(i++)); + + assertEquals("order", serviceC.getSimpleName() + ",init", trace.getNameTrace(i++)); + assertEquals("order", serviceA.getSimpleName() + ",init", trace.getNameTrace(i++)); + + assertEquals("order", serviceC.getSimpleName() + ",start", trace.getNameTrace(i++)); + assertEquals("order", serviceA.getSimpleName() + ",start", trace.getNameTrace(i++)); + + // start B + assertNotNull("got service started", registryA.getService(serviceB)); + assertTrue("B started", registryA.isStarted(serviceB)); + + + } + + + + /** + * Test the alias service. + * + * @throws ServiceException + */ + @Test + public void testAliasServices() throws ServiceException { + + Class<?> serviceA = FakeServiceA.class; + Class<?> serviceB = FakeServiceB.class; + Class<?> serviceC = FakeServiceC.class; + + String aliasService2 = "AnAlias"; + + // services A --> B + FakeService.getTrace().reset(); + + // Create an alias to B + ServicesRegistry registryA = new ServicesRegistry(); + registryA.add(new AliasDescriptor(serviceA.getName(), serviceB.getName(), 1)); + registryA.add(new AliasDescriptor(aliasService2, serviceC.getName(), 1)); + registryA.add(new ServiceDescriptor(serviceB, serviceB.getName(), ServiceStartKind.STARTUP, 1)); + registryA.add(new ServiceDescriptor(serviceC.getName(), ServiceStartKind.STARTUP, 1)); + + registryA.startNewServices(); + + + // check services + assertNotNull("got service started", registryA.getService(serviceB)); + assertNotNull("got service started", registryA.getService(serviceC)); + assertNotNull("got service started", registryA.getService(serviceA)); + assertNotNull("got service started", registryA.getService(aliasService2)); + + assertEquals("Got the same service", registryA.getService(serviceA), registryA.getService(serviceB)); + assertEquals("Got the same service", registryA.getService(serviceC), registryA.getService(aliasService2)); + + } + + /** + * General purpose descriptor. + * + * @deprecated use {@link FakeServiceDescriptor} + */ + @Deprecated + public class ServiceDesc extends ServiceDescriptor { + + + public ServiceDesc(String key, ServiceStartKind startKind) { + super(key, FakeService.class.getName(), startKind, 1); + } + + public ServiceDesc(String key, ServiceStartKind startKind, List<String> requiredService) { + super(key, FakeService.class.getName(), startKind, 1, requiredService); + } + } + + /** + * General purpose descriptor. + */ + public class ServiceFactoryDesc extends ServiceDescriptor { + + + public ServiceFactoryDesc(String key, ServiceStartKind startKind) { + super(key, FakeServiceFactory.class.getName(), startKind, 1); + setServiceTypeKind(ServiceTypeKind.serviceFactory); + } + + public ServiceFactoryDesc(String key, ServiceStartKind startKind, List<String> requiredService) { + super(key, FakeServiceFactory.class.getName(), startKind, 1, requiredService); + setServiceTypeKind(ServiceTypeKind.serviceFactory); + } + + /** + * Constructor with a classname and {@link ServiceDescriptor#isStartAtStartup()} = true. + * Constructor. + * + * @param key + * @param startKind + * @param requiredService + */ + public ServiceFactoryDesc(Class<?> key, String classname, ServiceStartKind startKind, List<String> requiredService) { + super(key, classname, startKind, 1, requiredService); + setServiceTypeKind(ServiceTypeKind.serviceFactory); + } + + /** + * Constructor with a classname and {@link ServiceDescriptor#isStartAtStartup()} = true. + * Constructor. + * + * @param key + * @param startKind + * @param requiredService + */ + public ServiceFactoryDesc(Class<?> key, String classname, ServiceStartKind startKind) { + super(key, classname, startKind, 1); + setServiceTypeKind(ServiceTypeKind.serviceFactory); + } + + public ServiceFactoryDesc(String key, String serviceClassname, ServiceStartKind serviceStartKind, int priority, List<String> requiredServices) { + super(key, serviceClassname, serviceStartKind, priority, requiredServices); + setServiceTypeKind(ServiceTypeKind.serviceFactory); + } + + public ServiceFactoryDesc(String key, String serviceClassname, ServiceStartKind serviceStartKind, int priority) { + super(key, serviceClassname, serviceStartKind, priority); + setServiceTypeKind(ServiceTypeKind.serviceFactory); + } + } + + /** + * + * @author dumoulin + * + */ + public class LazyServiceADescriptor extends ServiceDescriptor { + + + public LazyServiceADescriptor() { + super(ServiceA.class.getName(), ServiceStartKind.LAZY, 1); + } + } + + public class LazyServiceA10Descriptor extends ServiceDescriptor { + + + public LazyServiceA10Descriptor() { + super(ServiceA.class.getName(), ServiceA10.class.getName(), ServiceStartKind.LAZY, 10); + } + } + + public class LazyServiceBDescriptor extends ServiceDescriptor { + + + public LazyServiceBDescriptor() { + super(ServiceB.class.getName(), ServiceStartKind.LAZY, 1); + } + } + + public class ServiceCDescriptor extends ServiceDescriptor { + + + public ServiceCDescriptor() { + super(ServiceC.class.getName(), ServiceStartKind.STARTUP, 1); + } + } + + public class LazyServicePojoADescriptor extends ServiceDescriptor { + + + public LazyServicePojoADescriptor() { + super(ServicePojoA.class.getName(), ServiceStartKind.LAZY, 1); + } + } + + public class PojoServiceDescriptor extends ServiceDescriptor { + + + public PojoServiceDescriptor() { + super(Object.class.getName(), ServiceStartKind.STARTUP, 1); + } + } + + +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServicesRegistryWithParentTest.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServicesRegistryWithParentTest.java index cece8fd863c..0cf0f8011cf 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServicesRegistryWithParentTest.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/ServicesRegistryWithParentTest.java @@ -1,365 +1,365 @@ -/*****************************************************************************
- * Copyright (c) 2012 Cedric Dumoulin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.core.serviceregistry;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Arrays;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-
-/**
- * Tests ServicesRegistry with a parent registry.
- *
- * @author cedric dumoulin
- *
- */
-public class ServicesRegistryWithParentTest {
-
- /**
- * @throws java.lang.Exception
- */
- @Before
- public void setUp() throws Exception {
- }
-
- /**
- * @throws java.lang.Exception
- */
- @After
- public void tearDown() throws Exception {
- }
-
- /**
- * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry#addParentRegistry(org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry)}.
- */
- @Test
- public void testAddParentRegistry() {
-
- // Create a service registry
- ServicesRegistry registry = new ServicesRegistry();
- // Add a parent
- ServicesRegistry parentRegistry1 = new ServicesRegistry();
- registry.addParentRegistry(parentRegistry1);
-
- // Add a second parent
- ServicesRegistry parentRegistry2 = new ServicesRegistry();
- registry.addParentRegistry(parentRegistry2);
-
- // Check if parents are set
- // No way to do that. Just check the registry (but this will always succeed)
- assertNotNull("registry created", registry);
- }
-
- /**
- * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry#getService(java.lang.Object)}.
- * Create a registry with 2 parents.
- * Add a service in each registry
- * Try to get each service from the main regitry.
- *
- * @throws ServiceException
- *
- */
- @Test
- public void testGetServiceObject() throws ServiceException {
-
- String A = "serviceA";
- String B = "serviceB";
- String C = "serviceC";
-
- FakeService.getTrace().reset();
-
- // Create a service registry
- ServicesRegistry registry = new ServicesRegistry();
- // Add a service
- registry.add(new FakeServiceDescriptor(A, ServiceStartKind.STARTUP));
- registry.startNewServices();
-
-
- // Create parent registry with one service
- ServicesRegistry registryB = new ServicesRegistry();
- registryB.add(new FakeServiceDescriptor(B, ServiceStartKind.STARTUP));
- registryB.startNewServices();
- // Add as parent
- registry.addParentRegistry(registryB);
-
- // Create parent registry with one service
- ServicesRegistry registryC = new ServicesRegistry();
- registryC.add(new FakeServiceDescriptor(C, ServiceStartKind.STARTUP));
- registryC.startNewServices();
- // Add as parent
- registry.addParentRegistry(registryC);
-
- // Check if we can retrieve service
-
- assertNotNull("got service", registry.getService(A));
- assertTrue("Right type", FakeServiceDescriptor.getServiceType().isInstance(registry.getService(A)));
-
- assertNotNull("got service", registry.getService(B));
- assertTrue("Right type", FakeServiceDescriptor.getServiceType().isInstance(registry.getService(B)));
-
- assertNotNull("got service", registry.getService(C));
- assertTrue("Right type", FakeServiceDescriptor.getServiceType().isInstance(registry.getService(C)));
-
- }
-
- /**
- * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry#getService(java.lang.Class)}.
- *
- * @throws ServiceException
- */
- @Test
- public void testGetServiceClassOfS() throws ServiceException {
-
- FakeService.getTrace().reset();
-
- // Create a service registry
- ServicesRegistry registry = new ServicesRegistry();
- // Add a service
- registry.add(new ServiceDescriptor(FakeServiceA.class.getName(), ServiceStartKind.STARTUP, 1));
- registry.startNewServices();
-
-
- // Create parent registry with one service
- ServicesRegistry registryB = new ServicesRegistry();
- registryB.add(new ServiceDescriptor(FakeServiceB.class.getName(), ServiceStartKind.STARTUP, 1));
- registryB.startNewServices();
- // Add as parent
- registry.addParentRegistry(registryB);
-
- // Create parent registry with one service
- ServicesRegistry registryC = new ServicesRegistry();
- registryC.add(new ServiceDescriptor(FakeServiceC.class.getName(), ServiceStartKind.STARTUP, 1));
- registryC.startNewServices();
- // Add as parent
- registry.addParentRegistry(registryC);
-
- // Check if we can retrieve service
-
- assertNotNull("got service", registry.getService(FakeServiceA.class));
- assertTrue("Right type", FakeServiceDescriptor.getServiceType().isInstance(registry.getService(FakeServiceA.class)));
-
- assertNotNull("got service", registry.getService(FakeServiceB.class));
- assertTrue("Right type", FakeServiceDescriptor.getServiceType().isInstance(registry.getService(FakeServiceB.class)));
-
- assertNotNull("got service", registry.getService(FakeServiceC.class));
- assertTrue("Right type", FakeServiceDescriptor.getServiceType().isInstance(registry.getService(FakeServiceC.class)));
- }
-
- /**
- * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry#startRegistry()}.
- *
- * @throws ServiceException
- */
- @Test
- public void testStartRegistry() throws ServiceException {
- FakeService.getTrace().reset();
-
- // Create a service registry
- ServicesRegistry registry = new ServicesRegistry();
- // Add a service
- registry.add(new ServiceDescriptor(FakeServiceA.class.getName(), ServiceStartKind.STARTUP, 1));
- registry.startNewServices();
-
- assertTrue("registry and service started", registry.isStarted(FakeServiceA.class.getName()));
- }
-
- /**
- * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry#disposeRegistry()}.
- *
- * @throws ServiceMultiException
- */
- @Test
- public void testDisposeRegistry() throws ServiceMultiException {
- FakeService.getTrace().reset();
-
- // Create a service registry
- ServicesRegistry registry = new ServicesRegistry();
- // Add a service
- registry.add(new ServiceDescriptor(FakeServiceA.class.getName(), ServiceStartKind.STARTUP, 1));
- registry.startNewServices();
-
-
- // Create parent registry with one service
- ServicesRegistry registryB = new ServicesRegistry();
- registryB.add(new ServiceDescriptor(FakeServiceB.class.getName(), ServiceStartKind.STARTUP, 1));
- registryB.startNewServices();
- // Add as parent
- registry.addParentRegistry(registryB);
-
- // Create parent registry with one service
- ServicesRegistry registryC = new ServicesRegistry();
- registryC.add(new ServiceDescriptor(FakeServiceC.class.getName(), ServiceStartKind.STARTUP, 1));
- registryC.startNewServices();
- // Add as parent
- registry.addParentRegistry(registryC);
-
- // Check recursive dispose
- FakeService.getTrace().reset();
- registry.disposeRegistry();
-
- //
- TestTrace trace = FakeService.getTrace();
- assertTrue("dispose called", trace.contains(FakeServiceA.class.getSimpleName(), "dispose"));
- assertTrue("dispose called", trace.contains(FakeServiceB.class.getSimpleName(), "dispose"));
- assertTrue("dispose called", trace.contains(FakeServiceC.class.getSimpleName(), "dispose"));
- }
-
- /**
- * Test the start order for services having a dependency in a parent registry
- *
- * @throws ServiceException
- */
- @Test
- public void testStartServicesWithOutsideDependencies() throws ServiceException {
-
- Class<?> serviceA = FakeServiceA.class;
- Class<?> serviceB = FakeServiceB.class;
-
- // services A --> B
- FakeService.getTrace().reset();
-
- // Create parent registry B with one service
- ServicesRegistry registryB = new ServicesRegistry();
- registryB.add(new ServiceDescriptor(serviceB.getName(), ServiceStartKind.STARTUP, 1));
- registryB.startNewServices();
-
- // Create a service registry A -parent-> B
- ServicesRegistry registryA = new ServicesRegistry();
- registryA.add(new ServiceDescriptor(serviceA.getName(), ServiceStartKind.STARTUP, 1, Arrays.asList(serviceB.getName())));
-
- registryA.addParentRegistry(registryB);
- registryA.startNewServices();
-
-
- // check services
- assertTrue("service started", registryA.isStarted(serviceA));
- assertTrue("service started", registryB.isStarted(serviceB));
- assertTrue("service started", registryA.isStarted(serviceB));
-
- }
-
- /**
- * Test {@link ServicesRegistry#isStarted(Object)} for services in a parent registry
- *
- * @throws ServiceException
- */
- @Test
- public void testIsStarted() throws ServiceException {
-
- Class<?> serviceA = FakeServiceA.class;
- Class<?> serviceB = FakeServiceB.class;
-
- // services A --> B
- FakeService.getTrace().reset();
-
- // Create parent registry B with one service
- ServicesRegistry registryB = new ServicesRegistry();
- registryB.add(new ServiceDescriptor(serviceB.getName(), ServiceStartKind.STARTUP, 1));
- registryB.startNewServices();
-
- // Create a service registry A -parent-> B
- ServicesRegistry registryA = new ServicesRegistry();
- registryA.add(new ServiceDescriptor(serviceA.getName(), ServiceStartKind.STARTUP, 1));
-
- registryA.addParentRegistry(registryB);
- registryA.startNewServices();
-
-
- // check services
- assertTrue("service started", registryA.isStarted(serviceA));
- assertTrue("service started", registryB.isStarted(serviceB));
- // Access from registryA
- assertTrue("service started", registryA.isStarted(serviceB));
-
- }
-
- /**
- * Test {@link ServicesRegistry#isStarted(Object)} for services in a parent registry
- *
- * @throws ServiceException
- */
- @Test
- public void testServiceState() throws ServiceException {
-
- Class<?> serviceA = FakeServiceA.class;
- Class<?> serviceB = FakeServiceB.class;
-
- // services A --> B
- FakeService.getTrace().reset();
-
- // Create parent registry B with one service
- ServicesRegistry registryB = new ServicesRegistry();
- registryB.add(new ServiceDescriptor(serviceB.getName(), ServiceStartKind.STARTUP, 1));
- registryB.startNewServices();
-
- // Create a service registry A -parent-> B
- ServicesRegistry registryA = new ServicesRegistry();
- registryA.add(new ServiceDescriptor(serviceA.getName(), ServiceStartKind.STARTUP, 1));
-
- registryA.addParentRegistry(registryB);
- registryA.startNewServices();
-
-
- // check services
- assertEquals("service started", ServiceState.started, registryA.serviceState(serviceA));
- assertEquals("service started", ServiceState.started, registryB.serviceState(serviceB));
- // Access from registryA
- assertEquals("service started", ServiceState.started, registryA.serviceState(serviceB));
-
- }
-
- /**
- * Test the alias service.
- *
- * @throws ServiceException
- */
- @Test
- public void testAliasServices() throws ServiceException {
-
- Class<?> serviceA = FakeServiceA.class;
- Class<?> serviceB = FakeServiceB.class;
-
- // services A --> B
- FakeService.getTrace().reset();
-
- // Create parent registry B with one service
- ServicesRegistry registryB = new ServicesRegistry();
- registryB.add(new ServiceDescriptor(serviceB.getName(), ServiceStartKind.STARTUP, 1));
- registryB.startNewServices();
-
- // Create an alias to B
- ServicesRegistry registryA = new ServicesRegistry();
- registryA.add(new AliasDescriptor(serviceA.getName(), serviceB.getName(), 1));
-
- registryA.addParentRegistry(registryB);
- registryA.startNewServices();
-
-
- // check services
- assertNotNull("got service started", registryA.getService(serviceA));
- assertNotNull("got service started", registryB.getService(serviceB));
-
- assertEquals("Got the same service", registryA.getService(serviceA), registryA.getService(serviceB));
-
- }
-
-
-}
+/***************************************************************************** + * Copyright (c) 2012 Cedric Dumoulin. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.core.serviceregistry; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.Arrays; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + + +/** + * Tests ServicesRegistry with a parent registry. + * + * @author cedric dumoulin + * + */ +public class ServicesRegistryWithParentTest { + + /** + * @throws java.lang.Exception + */ + @Before + public void setUp() throws Exception { + } + + /** + * @throws java.lang.Exception + */ + @After + public void tearDown() throws Exception { + } + + /** + * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry#addParentRegistry(org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry)}. + */ + @Test + public void testAddParentRegistry() { + + // Create a service registry + ServicesRegistry registry = new ServicesRegistry(); + // Add a parent + ServicesRegistry parentRegistry1 = new ServicesRegistry(); + registry.addParentRegistry(parentRegistry1); + + // Add a second parent + ServicesRegistry parentRegistry2 = new ServicesRegistry(); + registry.addParentRegistry(parentRegistry2); + + // Check if parents are set + // No way to do that. Just check the registry (but this will always succeed) + assertNotNull("registry created", registry); + } + + /** + * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry#getService(java.lang.Object)}. + * Create a registry with 2 parents. + * Add a service in each registry + * Try to get each service from the main regitry. + * + * @throws ServiceException + * + */ + @Test + public void testGetServiceObject() throws ServiceException { + + String A = "serviceA"; + String B = "serviceB"; + String C = "serviceC"; + + FakeService.getTrace().reset(); + + // Create a service registry + ServicesRegistry registry = new ServicesRegistry(); + // Add a service + registry.add(new FakeServiceDescriptor(A, ServiceStartKind.STARTUP)); + registry.startNewServices(); + + + // Create parent registry with one service + ServicesRegistry registryB = new ServicesRegistry(); + registryB.add(new FakeServiceDescriptor(B, ServiceStartKind.STARTUP)); + registryB.startNewServices(); + // Add as parent + registry.addParentRegistry(registryB); + + // Create parent registry with one service + ServicesRegistry registryC = new ServicesRegistry(); + registryC.add(new FakeServiceDescriptor(C, ServiceStartKind.STARTUP)); + registryC.startNewServices(); + // Add as parent + registry.addParentRegistry(registryC); + + // Check if we can retrieve service + + assertNotNull("got service", registry.getService(A)); + assertTrue("Right type", FakeServiceDescriptor.getServiceType().isInstance(registry.getService(A))); + + assertNotNull("got service", registry.getService(B)); + assertTrue("Right type", FakeServiceDescriptor.getServiceType().isInstance(registry.getService(B))); + + assertNotNull("got service", registry.getService(C)); + assertTrue("Right type", FakeServiceDescriptor.getServiceType().isInstance(registry.getService(C))); + + } + + /** + * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry#getService(java.lang.Class)}. + * + * @throws ServiceException + */ + @Test + public void testGetServiceClassOfS() throws ServiceException { + + FakeService.getTrace().reset(); + + // Create a service registry + ServicesRegistry registry = new ServicesRegistry(); + // Add a service + registry.add(new ServiceDescriptor(FakeServiceA.class.getName(), ServiceStartKind.STARTUP, 1)); + registry.startNewServices(); + + + // Create parent registry with one service + ServicesRegistry registryB = new ServicesRegistry(); + registryB.add(new ServiceDescriptor(FakeServiceB.class.getName(), ServiceStartKind.STARTUP, 1)); + registryB.startNewServices(); + // Add as parent + registry.addParentRegistry(registryB); + + // Create parent registry with one service + ServicesRegistry registryC = new ServicesRegistry(); + registryC.add(new ServiceDescriptor(FakeServiceC.class.getName(), ServiceStartKind.STARTUP, 1)); + registryC.startNewServices(); + // Add as parent + registry.addParentRegistry(registryC); + + // Check if we can retrieve service + + assertNotNull("got service", registry.getService(FakeServiceA.class)); + assertTrue("Right type", FakeServiceDescriptor.getServiceType().isInstance(registry.getService(FakeServiceA.class))); + + assertNotNull("got service", registry.getService(FakeServiceB.class)); + assertTrue("Right type", FakeServiceDescriptor.getServiceType().isInstance(registry.getService(FakeServiceB.class))); + + assertNotNull("got service", registry.getService(FakeServiceC.class)); + assertTrue("Right type", FakeServiceDescriptor.getServiceType().isInstance(registry.getService(FakeServiceC.class))); + } + + /** + * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry#startRegistry()}. + * + * @throws ServiceException + */ + @Test + public void testStartRegistry() throws ServiceException { + FakeService.getTrace().reset(); + + // Create a service registry + ServicesRegistry registry = new ServicesRegistry(); + // Add a service + registry.add(new ServiceDescriptor(FakeServiceA.class.getName(), ServiceStartKind.STARTUP, 1)); + registry.startNewServices(); + + assertTrue("registry and service started", registry.isStarted(FakeServiceA.class.getName())); + } + + /** + * Test method for {@link org.eclipse.papyrus.infra.core.serviceregistry.ServicesRegistry#disposeRegistry()}. + * + * @throws ServiceMultiException + */ + @Test + public void testDisposeRegistry() throws ServiceMultiException { + FakeService.getTrace().reset(); + + // Create a service registry + ServicesRegistry registry = new ServicesRegistry(); + // Add a service + registry.add(new ServiceDescriptor(FakeServiceA.class.getName(), ServiceStartKind.STARTUP, 1)); + registry.startNewServices(); + + + // Create parent registry with one service + ServicesRegistry registryB = new ServicesRegistry(); + registryB.add(new ServiceDescriptor(FakeServiceB.class.getName(), ServiceStartKind.STARTUP, 1)); + registryB.startNewServices(); + // Add as parent + registry.addParentRegistry(registryB); + + // Create parent registry with one service + ServicesRegistry registryC = new ServicesRegistry(); + registryC.add(new ServiceDescriptor(FakeServiceC.class.getName(), ServiceStartKind.STARTUP, 1)); + registryC.startNewServices(); + // Add as parent + registry.addParentRegistry(registryC); + + // Check recursive dispose + FakeService.getTrace().reset(); + registry.disposeRegistry(); + + // + TestTrace trace = FakeService.getTrace(); + assertTrue("dispose called", trace.contains(FakeServiceA.class.getSimpleName(), "dispose")); + assertTrue("dispose called", trace.contains(FakeServiceB.class.getSimpleName(), "dispose")); + assertTrue("dispose called", trace.contains(FakeServiceC.class.getSimpleName(), "dispose")); + } + + /** + * Test the start order for services having a dependency in a parent registry + * + * @throws ServiceException + */ + @Test + public void testStartServicesWithOutsideDependencies() throws ServiceException { + + Class<?> serviceA = FakeServiceA.class; + Class<?> serviceB = FakeServiceB.class; + + // services A --> B + FakeService.getTrace().reset(); + + // Create parent registry B with one service + ServicesRegistry registryB = new ServicesRegistry(); + registryB.add(new ServiceDescriptor(serviceB.getName(), ServiceStartKind.STARTUP, 1)); + registryB.startNewServices(); + + // Create a service registry A -parent-> B + ServicesRegistry registryA = new ServicesRegistry(); + registryA.add(new ServiceDescriptor(serviceA.getName(), ServiceStartKind.STARTUP, 1, Arrays.asList(serviceB.getName()))); + + registryA.addParentRegistry(registryB); + registryA.startNewServices(); + + + // check services + assertTrue("service started", registryA.isStarted(serviceA)); + assertTrue("service started", registryB.isStarted(serviceB)); + assertTrue("service started", registryA.isStarted(serviceB)); + + } + + /** + * Test {@link ServicesRegistry#isStarted(Object)} for services in a parent registry + * + * @throws ServiceException + */ + @Test + public void testIsStarted() throws ServiceException { + + Class<?> serviceA = FakeServiceA.class; + Class<?> serviceB = FakeServiceB.class; + + // services A --> B + FakeService.getTrace().reset(); + + // Create parent registry B with one service + ServicesRegistry registryB = new ServicesRegistry(); + registryB.add(new ServiceDescriptor(serviceB.getName(), ServiceStartKind.STARTUP, 1)); + registryB.startNewServices(); + + // Create a service registry A -parent-> B + ServicesRegistry registryA = new ServicesRegistry(); + registryA.add(new ServiceDescriptor(serviceA.getName(), ServiceStartKind.STARTUP, 1)); + + registryA.addParentRegistry(registryB); + registryA.startNewServices(); + + + // check services + assertTrue("service started", registryA.isStarted(serviceA)); + assertTrue("service started", registryB.isStarted(serviceB)); + // Access from registryA + assertTrue("service started", registryA.isStarted(serviceB)); + + } + + /** + * Test {@link ServicesRegistry#isStarted(Object)} for services in a parent registry + * + * @throws ServiceException + */ + @Test + public void testServiceState() throws ServiceException { + + Class<?> serviceA = FakeServiceA.class; + Class<?> serviceB = FakeServiceB.class; + + // services A --> B + FakeService.getTrace().reset(); + + // Create parent registry B with one service + ServicesRegistry registryB = new ServicesRegistry(); + registryB.add(new ServiceDescriptor(serviceB.getName(), ServiceStartKind.STARTUP, 1)); + registryB.startNewServices(); + + // Create a service registry A -parent-> B + ServicesRegistry registryA = new ServicesRegistry(); + registryA.add(new ServiceDescriptor(serviceA.getName(), ServiceStartKind.STARTUP, 1)); + + registryA.addParentRegistry(registryB); + registryA.startNewServices(); + + + // check services + assertEquals("service started", ServiceState.started, registryA.serviceState(serviceA)); + assertEquals("service started", ServiceState.started, registryB.serviceState(serviceB)); + // Access from registryA + assertEquals("service started", ServiceState.started, registryA.serviceState(serviceB)); + + } + + /** + * Test the alias service. + * + * @throws ServiceException + */ + @Test + public void testAliasServices() throws ServiceException { + + Class<?> serviceA = FakeServiceA.class; + Class<?> serviceB = FakeServiceB.class; + + // services A --> B + FakeService.getTrace().reset(); + + // Create parent registry B with one service + ServicesRegistry registryB = new ServicesRegistry(); + registryB.add(new ServiceDescriptor(serviceB.getName(), ServiceStartKind.STARTUP, 1)); + registryB.startNewServices(); + + // Create an alias to B + ServicesRegistry registryA = new ServicesRegistry(); + registryA.add(new AliasDescriptor(serviceA.getName(), serviceB.getName(), 1)); + + registryA.addParentRegistry(registryB); + registryA.startNewServices(); + + + // check services + assertNotNull("got service started", registryA.getService(serviceA)); + assertNotNull("got service started", registryB.getService(serviceB)); + + assertEquals("Got the same service", registryA.getService(serviceA), registryA.getService(serviceB)); + + } + + +} diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/TestTrace.java b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/TestTrace.java index 748ffe09a68..82c4943d374 100644 --- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.test/tests/org/eclipse/papyrus/infra/core/serviceregistry/TestTrace.java +++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.tests/tests/org/eclipse/papyrus/infra/core/serviceregistry/TestTrace.java @@ -1,193 +1,193 @@ -/**
- *
- */
-package org.eclipse.papyrus.infra.core.serviceregistry;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- * A class used to record traces for tests
- *
- * @author cedric dumoulin
- *
- */
-public class TestTrace {
-
- public List<TraceRecord> traces = new ArrayList<TraceRecord>();
-
- /**
- * Record a new trace.
- *
- * @param trace
- */
- public void addTrace(String trace) {
- addTrace(null, trace, null);
- }
-
- /**
- * Record a new trace.
- *
- * @param trace
- */
- public void addTrace(String name, String trace) {
- addTrace(name, trace, null);
- }
-
- /**
- * Record a new trace.
- *
- * @param trace
- */
- public void addTrace(String name, String trace, Object value) {
- traces.add(new TraceRecord(name, trace, value));
- }
-
- /**
- * Return the name and the trace in one concatenated string ("name,trace").
- *
- * @param i
- * Index of the requested trace
- * @return
- */
- public String getNameTrace(int i) {
- return traces.get(i).getNameTrace();
- }
-
- /**
- * Get the value
- *
- * @param i
- * @return
- */
- public Object getValue(int i) {
- return traces.get(i).value;
- }
-
- /**
- * Return true if the trace contains the specified events.
- *
- * @return
- */
- public boolean contains(String name, String trace) {
-
- return indexOfNameTrace(name, trace) >= 0;
- }
-
- /**
- * Returns the index of the first occurrence of the specified elements
- * in these lists, or -1 if this list does not contain the element.
- */
- public int indexOf(String name, String trace, Object value) {
-
- for (int i = 0; i < traces.size(); i++) {
- TraceRecord record = traces.get(i);
-
- if (name.equals(record.name) && trace.equals(record.trace)) {
- return i;
- }
- }
-
- return -1;
- }
-
- /**
- * Returns the index of the first occurrence of the specified elements
- * in these lists, or -1 if this list does not contain the element.
- */
- public int indexOfNameTrace(String name, String trace) {
-
- for (int i = 0; i < traces.size(); i++) {
- TraceRecord record = traces.get(i);
-
- if (name.equals(record.name) && trace.equals(record.trace)) {
- return i;
- }
- }
-
- return -1;
- }
-
- /**
- * Returns the index of the first occurrence of the specified elements
- * in these lists, or -1 if this list does not contain the element.
- */
- public int indexOfTrace(String trace) {
-
- for (int i = 0; i < traces.size(); i++) {
- TraceRecord record = traces.get(i);
-
- if (trace.equals(record.trace)) {
- return i;
- }
- }
-
- return -1;
- }
-
- /**
- * Returns the index of the first occurrence of the specified elements
- * in these lists, or -1 if this list does not contain the element.
- */
- public int indexOfName(String name) {
-
- for (int i = 0; i < traces.size(); i++) {
- TraceRecord record = traces.get(i);
-
- if (name.equals(record.name)) {
- return i;
- }
- }
-
- return -1;
- }
-
- /**
- * Reset the trace.
- */
- public void reset() {
- traces.clear();
- }
-
-
- /**
- * @return the traces
- */
- public List<TraceRecord> getTraces() {
- return traces;
- }
-
- /**
- * A Record of the trace.
- */
- public class TraceRecord {
- public String name;
- public String trace;
- public Object value;
-
- /**
- * Constructor.
- *
- * @param name
- * @param trace
- * @param value
- */
- public TraceRecord(String name, String trace, Object value) {
- this.name = name;
- this.trace = trace;
- this.value = value;
- }
-
- /**
- *
- * @return
- */
- public String getNameTrace() {
- // TODO Auto-generated method stub
- return name + "," + trace;
- }
-
- }
-
-}
+/** + * + */ +package org.eclipse.papyrus.infra.core.serviceregistry; + +import java.util.ArrayList; +import java.util.List; + + +/** + * A class used to record traces for tests + * + * @author cedric dumoulin + * + */ +public class TestTrace { + + public List<TraceRecord> traces = new ArrayList<TraceRecord>(); + + /** + * Record a new trace. + * + * @param trace + */ + public void addTrace(String trace) { + addTrace(null, trace, null); + } + + /** + * Record a new trace. + * + * @param trace + */ + public void addTrace(String name, String trace) { + addTrace(name, trace, null); + } + + /** + * Record a new trace. + * + * @param trace + */ + public void addTrace(String name, String trace, Object value) { + traces.add(new TraceRecord(name, trace, value)); + } + + /** + * Return the name and the trace in one concatenated string ("name,trace"). + * + * @param i + * Index of the requested trace + * @return + */ + public String getNameTrace(int i) { + return traces.get(i).getNameTrace(); + } + + /** + * Get the value + * + * @param i + * @return + */ + public Object getValue(int i) { + return traces.get(i).value; + } + + /** + * Return true if the trace contains the specified events. + * + * @return + */ + public boolean contains(String name, String trace) { + + return indexOfNameTrace(name, trace) >= 0; + } + + /** + * Returns the index of the first occurrence of the specified elements + * in these lists, or -1 if this list does not contain the element. + */ + public int indexOf(String name, String trace, Object value) { + + for (int i = 0; i < traces.size(); i++) { + TraceRecord record = traces.get(i); + + if (name.equals(record.name) && trace.equals(record.trace)) { + return i; + } + } + + return -1; + } + + /** + * Returns the index of the first occurrence of the specified elements + * in these lists, or -1 if this list does not contain the element. + */ + public int indexOfNameTrace(String name, String trace) { + + for (int i = 0; i < traces.size(); i++) { + TraceRecord record = traces.get(i); + + if (name.equals(record.name) && trace.equals(record.trace)) { + return i; + } + } + + return -1; + } + + /** + * Returns the index of the first occurrence of the specified elements + * in these lists, or -1 if this list does not contain the element. + */ + public int indexOfTrace(String trace) { + + for (int i = 0; i < traces.size(); i++) { + TraceRecord record = traces.get(i); + + if (trace.equals(record.trace)) { + return i; + } + } + + return -1; + } + + /** + * Returns the index of the first occurrence of the specified elements + * in these lists, or -1 if this list does not contain the element. + */ + public int indexOfName(String name) { + + for (int i = 0; i < traces.size(); i++) { + TraceRecord record = traces.get(i); + + if (name.equals(record.name)) { + return i; + } + } + + return -1; + } + + /** + * Reset the trace. + */ + public void reset() { + traces.clear(); + } + + + /** + * @return the traces + */ + public List<TraceRecord> getTraces() { + return traces; + } + + /** + * A Record of the trace. + */ + public class TraceRecord { + public String name; + public String trace; + public Object value; + + /** + * Constructor. + * + * @param name + * @param trace + * @param value + */ + public TraceRecord(String name, String trace, Object value) { + this.name = name; + this.trace = trace; + this.value = value; + } + + /** + * + * @return + */ + public String getNameTrace() { + // TODO Auto-generated method stub + return name + "," + trace; + } + + } + +} diff --git a/releng/org.eclipse.papyrus.oomph/setups/papyrus.setup b/releng/org.eclipse.papyrus.oomph/setups/papyrus.setup index a59ec5ab4a1..e64cfb7a0fa 100644 --- a/releng/org.eclipse.papyrus.oomph/setups/papyrus.setup +++ b/releng/org.eclipse.papyrus.oomph/setups/papyrus.setup @@ -405,8 +405,14 @@ <sourceLocator rootFolder="${papyrus.git.clone.location/tests/junit/plugins}"> <predicate - xsi:type="predicates:NamePredicate" - pattern="org\.eclipse\.papyrus\.junit\.utils"/> + xsi:type="predicates:OrPredicate"> + <operand + xsi:type="predicates:NamePredicate" + pattern="org\.eclipse\.papyrus\.junit\.framework"/> + <operand + xsi:type="predicates:NamePredicate" + pattern="org\.eclipse\.papyrus\.junit\.utils"/> + </predicate> </sourceLocator> </setupTask> <project name="main" @@ -471,14 +477,7 @@ <sourceLocator rootFolder="${papyrus.git.clone.location/tests/junit/plugins/infra}"/> <sourceLocator - rootFolder="${papyrus.git.clone.location/tests/junit/plugins/core}"> - <predicate - xsi:type="predicates:NotPredicate"> - <operand - xsi:type="predicates:NamePredicate" - pattern="org\.eclipse\.papyrus\.(?:infra\.core\.)?sasheditor\.di\.tests"/> - </predicate> - </sourceLocator> + rootFolder="${papyrus.git.clone.location/tests/junit/plugins/core}"/> </setupTask> <setupTask xsi:type="setup.workingsets:WorkingSetTask"> @@ -1152,7 +1151,8 @@ <setupTask xsi:type="projects:ProjectsImportTask"> <sourceLocator - rootFolder="${papyrus.git.clone.location/releng}"/> + rootFolder="${papyrus.git.clone.location/releng}" + locateNestedProjects="true"/> </setupTask> <setupTask xsi:type="setup.workingsets:WorkingSetTask"> @@ -1161,7 +1161,7 @@ id="papyrus-releng"> <predicate xsi:type="predicates:LocationPredicate" - pattern="${papyrus.git.clone.location/releng/.*}"/> + pattern="${papyrus.git.clone.location/releng(?:/.+)?}"/> </workingSet> </setupTask> <stream diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/.settings/org.eclipse.jdt.core.prefs index 72532281a89..4759947300a 100644 --- a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,3 @@ -#Sun Dec 12 00:57:46 CET 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@@ -6,3 +5,287 @@ org.eclipse.jdt.core.compiler.compliance=1.5 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..954281dbc31 --- /dev/null +++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,68 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=false +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup.use_type_arguments=false +cleanup_profile=_Papyrus +cleanup_settings_version=2 +eclipse.preferences.version=1 +formatter_profile=_Papyrus +formatter_settings_version=12 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/.settings/org.eclipse.jdt.core.prefs index 70803840e5e..4759947300a 100644 --- a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,3 @@ -#Tue Nov 09 21:18:25 CET 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@@ -6,3 +5,287 @@ org.eclipse.jdt.core.compiler.compliance=1.5 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..954281dbc31 --- /dev/null +++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,68 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=false +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup.use_type_arguments=false +cleanup_profile=_Papyrus +cleanup_settings_version=2 +eclipse.preferences.version=1 +formatter_profile=_Papyrus +formatter_settings_version=12 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> |