Class ComponentAssert
- java.lang.Object
-
- com.adobe.cq.testing.junit.assertion.ComponentAssert
-
- Direct Known Subclasses:
FoundationAssert
public class ComponentAssert extends Object
-
-
Constructor Summary
Constructors Constructor Description ComponentAssert()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 voidassertValidComponentNode(AbstractComponent comp)Checks if the component's node has the minimum to be a valid component node.
-
-
-
Method Detail
-
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
public static void assertStringProperty(AbstractComponent comp, String value, String propName)
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.ClientExceptionChecks 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
-
-