com.scit.sling.test
Class MockResource

java.lang.Object
  extended by org.apache.sling.api.adapter.SlingAdaptable
      extended by org.apache.sling.api.resource.AbstractResource
          extended by org.apache.sling.api.resource.SyntheticResource
              extended by org.apache.sling.commons.testing.sling.MockResource
                  extended by com.scit.sling.test.MockResource
All Implemented Interfaces:
org.apache.sling.api.adapter.Adaptable, org.apache.sling.api.resource.Resource

public class MockResource
extends org.apache.sling.commons.testing.sling.MockResource

An mock Resource that can be adapted to ValueMap and possibly other adaptables.


Field Summary
 
Fields inherited from interface org.apache.sling.api.resource.Resource
RESOURCE_TYPE_NON_EXISTING
 
Constructor Summary
MockResource(org.apache.sling.api.resource.ResourceResolver resourceResolver, String path, String resourceType)
           
MockResource(org.apache.sling.api.resource.ResourceResolver resourceResolver, String path, String resourceType, String resourceSuperType)
           
 
Method Summary
<AdapterType>
AdapterType
adaptTo(Class<AdapterType> type)
           
 MockAdapter getMockAdaptable()
           
 
Methods inherited from class org.apache.sling.commons.testing.sling.MockResource
addProperty, getProperties, getResourceSuperType, getResourceType, setResourceSuperType, setResourceType
 
Methods inherited from class org.apache.sling.api.resource.SyntheticResource
getPath, getResourceMetadata, getResourceResolver, toString
 
Methods inherited from class org.apache.sling.api.resource.AbstractResource
getChild, getChildren, getName, getParent, isResourceType, listChildren
 
Methods inherited from class org.apache.sling.api.adapter.SlingAdaptable
setAdapterManager, unsetAdapterManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MockResource

public MockResource(org.apache.sling.api.resource.ResourceResolver resourceResolver,
                    String path,
                    String resourceType,
                    String resourceSuperType)

MockResource

public MockResource(org.apache.sling.api.resource.ResourceResolver resourceResolver,
                    String path,
                    String resourceType)
Method Detail

adaptTo

public <AdapterType> AdapterType adaptTo(Class<AdapterType> type)
Specified by:
adaptTo in interface org.apache.sling.api.adapter.Adaptable
Overrides:
adaptTo in class org.apache.sling.commons.testing.sling.MockResource

getMockAdaptable

public MockAdapter getMockAdaptable()


Copyright © 2013 Southern Cross IT. All rights reserved.