Class ComponentAssert
java.lang.Object
com.adobe.cq.testing.junit.assertion.ComponentAssert
- Direct Known Subclasses:
FoundationAssert
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertBinaryCompare(InputStream inStream1, InputStream inStream2) static voidassertHasEditDialog(org.apache.sling.testing.clients.AbstractSlingClient client, String resourceType) Checks if the component type has a edit dialog defined.static voidassertStringProperty(AbstractComponent comp, String value, String propName) Checks if the property of a node is set to the correct value.static voidassertUploadedImage(CQClient client, String imagePath, String resourcePath) static voidChecks if the component's node has the minimum to be a valid component node.
-
Constructor Details
-
ComponentAssert
public ComponentAssert()
-
-
Method Details
-
assertValidComponentNode
public static void assertValidComponentNode(AbstractComponent comp) throws org.apache.sling.testing.clients.ClientException, InterruptedException Checks if the component's node has the minimum to be a valid component node.- Parameters:
comp- the component class referencing the component on the server- Throws:
org.apache.sling.testing.clients.ClientException- if requesting json node of fails for some reasonInterruptedException- to mark this method as waiting
-
assertStringProperty
Checks if the property of a node is set to the correct value.- Parameters:
comp- the compent that contains the propertyvalue- the expected valuepropName- the name of the property to check
-
assertUploadedImage
public static void assertUploadedImage(CQClient client, String imagePath, String resourcePath) throws org.apache.sling.testing.clients.ClientException, IOException - Throws:
org.apache.sling.testing.clients.ClientExceptionIOException
-
assertBinaryCompare
public static void assertBinaryCompare(InputStream inStream1, InputStream inStream2) throws org.apache.sling.testing.clients.ClientException - Throws:
org.apache.sling.testing.clients.ClientException
-
assertHasEditDialog
public static void assertHasEditDialog(org.apache.sling.testing.clients.AbstractSlingClient client, String resourceType) throws org.apache.sling.testing.clients.ClientException Checks if the component type has a edit dialog defined.- Parameters:
client- client to be usedresourceType- the component to check- Throws:
org.apache.sling.testing.clients.ClientException- if requesting the dialog definition as json fails
-