public class TestUtils extends Object
| Constructor and Description | 
|---|
| TestUtils() | 
| Modifier and Type | Method and Description | 
|---|---|
| static void | assertEquals(URL source,
            String text) | 
| static boolean | compare(URL url,
       String text)Attempt to verify the contents of text against the contents of the URL
 specified. | 
| static String | normalize(String json,
         boolean removeSpaces)normalizes a string so that strings generated on different platforms can
 be compared. | 
| static String | normalize(URL url) | 
| static String | readContent(URL url) | 
| static String | readContent(URL url,
           Charset encoding) | 
public static String normalize(String json, boolean removeSpaces)
json - the JSON to be normalized. normalize will trim before startingremoveSpaces - removes white spaces from the JSON or notpublic static boolean compare(URL url, String text) throws Exception
url - the HTML snippet that we want to validate againstException - if the validation failedpublic static void assertEquals(URL source, String text) throws Exception
ExceptionCopyright © 2000–2025 Apache Software Foundation. All rights reserved.