Skip to end of metadata
Go to start of metadata

In testing of complex examples, it is often needed to perform custom JavaScript code.
For this purposes, there is implemented JavaScript class, which encapsulates the common functionality:

Constructing

Using new JavaScript(String) constructor or JavaScript.js(String) factory method with same semantics.

Loading

  • from classpath resource - using factory method JavaScript.fromResource(String resourceName)
  • from file - using factory method JavaScript.fromFile(File) 

Joining Scripts

Using JavaScript#join(JavaScript) method.

Appending

Using JavaScript#append(String).

Parametrizing

The JavaScript code placeholders (using SimplifiedFormat format) with JavaScript#parametrize(Object...)

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.