public class CQAssert extends Object
Constructor and Description |
---|
CQAssert() |
Modifier and Type | Method and Description |
---|---|
static void |
assertAssetExists(CQClient client,
String path,
InputStream fileData,
String mimeType)
Tests if a Asset exists at the location path.
|
static void |
assertCQPageExistsWithTimeout(CQClient client,
String path,
long timeout,
long delay)
Tests if the page at path exists on the server connected by client and is
a valid CQ Page.
|
static void |
assertFileExists(CQClient client,
String path,
InputStream fileData,
String mimeType)
Tests if a File exists at the location path.
|
static void |
assertFolderExists(CQClient client,
String path,
String folderTitle)
Tests if a folder exists at the location path with named folderTitle.
|
static void |
assertIsBluePrint(CQClient client,
String path) |
static void |
assertIsCQPage(CQClient client,
String path)
Verifies if a page is really a CQ page by checking for specific nodes
and properties:
jcr:primaryType is set to cq:Page jcr:content node exists jcr:primaryType is set to cq:PageContent in jcr:content node sling:resourceType is set in jcr:content node cq:template is set in jcr:content node |
static void |
assertIsLiveSite(CQClient client,
String newPath,
String masterPath) |
static void |
assertIsVersionList(CQClient client,
String jsonString) |
static void |
assertIsVersionTree(CQClient client,
String jsonString) |
static void |
assertPathDoesNotExistWithTimeout(CQClient client,
String path,
long timeout,
long delay) |
public static void assertCQPageExistsWithTimeout(CQClient client, String path, long timeout, long delay) throws InterruptedException
client
- The client used for requesting the page.path
- The path to the pagetimeout
- How long we should try to reach the page in milliseconds.delay
- Time between request retries in milliseconds.InterruptedException
- to mark this method as waitingpublic static void assertPathDoesNotExistWithTimeout(CQClient client, String path, long timeout, long delay) throws InterruptedException
InterruptedException
public static void assertFolderExists(CQClient client, String path, String folderTitle)
client
- The client used to request the json for the folder node.path
- Path to the folder in question.folderTitle
- Title of the folder to verify.public static void assertFileExists(CQClient client, String path, InputStream fileData, String mimeType)
client
- The client used to request the json for the folder node.path
- Path to the file in question.fileData
- The file's contents that were uploaded.mimeType
- file mime typepublic static void assertAssetExists(CQClient client, String path, InputStream fileData, String mimeType)
client
- The client used to request the json for the folder node.path
- Path to the asset in question.fileData
- The file's contents that were uploaded.mimeType
- file mime typepublic static void assertIsCQPage(CQClient client, String path)
client
- The client used to doGet the JSON of the pagepath
- Location of the pagepublic static void assertIsLiveSite(CQClient client, String newPath, String masterPath)
Copyright © 2018. All rights reserved.