@Test public void attributeWithNonLocalProfileUsesRightClass() { final DocumentReference specialUserProfile = new DocumentReference("playground", "SouthPark", "timmy"); final DocumentReference specialUserClass = new DocumentReference("playground", "XWiki", "XWikiUsers"); this.user = new WikiUser(specialUserProfile, this.serializer, this.bridgeMock, this.resolver); when(this.bridgeMock.getProperty(specialUserProfile, specialUserClass, "motto")).thenReturn("Living a lie!"); Assert.assertEquals("Living a lie!", this.user.getAttribute("motto")); }
@Override public Object getAttribute(String attributeName) { if (this.profileReference == null) { return null; } return this.bridge.getProperty(this.profileReference, this.classReference, attributeName); }
WikiUser extends AbstractUser { @Override public Object getAttribute(String attributeName) { if (this.profileReference == null) { return null; } return this.bridge.getProperty(this.profileReference, this.classReference, attributeName); } }
WikiUser extends AbstractUser { @Override public Object getAttribute(String attributeName) { if (this.profileReference == null) { return null; } return this.bridge.getProperty(this.profileReference, this.classReference, attributeName); } WikiUser(DocumentReference reference, EntityReferenceSerializer<String> serializer,
        DocumentAccessBridge bridge, EntityReferenceResolver<EntityReference> resolver); }
WikiUser extends AbstractUser { @Override public Object getAttribute(String attributeName) { if (this.profileReference == null) { return null; } return this.bridge.getProperty(this.profileReference, this.classReference, attributeName); } WikiUser(DocumentReference reference, EntityReferenceSerializer<String> serializer,
        DocumentAccessBridge bridge, EntityReferenceResolver<EntityReference> resolver); @Override boolean exists(); @Override String getName(); @Override Object getAttribute(String attributeName); @Override URI getProfileURI(); }
WikiUser extends AbstractUser { @Override public Object getAttribute(String attributeName) { if (this.profileReference == null) { return null; } return this.bridge.getProperty(this.profileReference, this.classReference, attributeName); } WikiUser(DocumentReference reference, EntityReferenceSerializer<String> serializer,
        DocumentAccessBridge bridge, EntityReferenceResolver<EntityReference> resolver); @Override boolean exists(); @Override String getName(); @Override Object getAttribute(String attributeName); @Override URI getProfileURI();  }