Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 49395 Details for
Bug 156191
CacheAdapter caches value of Property::class
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
test case for the described bug
TestCacheAdapter.java (text/plain), 1.49 KB, created by
Matthias Köster
on 2006-09-05 09:04:26 EDT
(
hide
)
Description:
test case for the described bug
Filename:
MIME Type:
Creator:
Matthias Köster
Created:
2006-09-05 09:04:26 EDT
Size:
1.49 KB
patch
obsolete
>package com.gentleware.uml2.cache.adapter; > >import java.util.Collection; > >import junit.framework.TestCase; > >import org.eclipse.emf.common.util.URI; >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.uml2.common.util.CacheAdapter; >import org.eclipse.uml2.uml.Class; >import org.eclipse.uml2.uml.Property; >import org.eclipse.uml2.uml.UMLFactory; > >/* > * @author mmatthias.koester@gentleware.com > */ >public class TestCacheAdapter extends TestCase { > > public void testPropertyClass() { > ResourceSet resourceSet = new ResourceSetImpl(); > Resource resource = resourceSet.createResource(URI.createFileURI("/tmp/test.uml")); > > Class testClass = UMLFactory.eINSTANCE.createClass(); > resource.getContents().add(testClass); > > Class testClass1 = UMLFactory.eINSTANCE.createClass(); > resource.getContents().add(testClass1); > > Property attribute = testClass.createOwnedAttribute("test", testClass); > CacheAdapter cacheAdapter = CacheAdapter.INSTANCE; > Collection inverse = cacheAdapter.getNonNavigableInverseReferences(testClass); > assertEquals(2, inverse.size()); > > testClass1.getOwnedAttributes().add(attribute); > attribute.setType(null); > assertEquals(testClass1, attribute.getClass_()); > inverse = CacheAdapter.INSTANCE.getNonNavigableInverseReferences(testClass); > assertTrue(inverse.isEmpty()); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 156191
: 49395