Package org.apache.sling.commons.testing.util

# Class JavascriptEngine

java.lang.Object
org.apache.sling.commons.testing.util.JavascriptEngine

public class JavascriptEngine extends Object
Simplistic Javascript engine using Rhino, meant for automated tests

## Constructor Summary

Constructors
Constructor
Description
`JavascriptEngine()`

## Method Summary

Modifier and Type
Method
Description
`String`
`execute(String code, String jsonData)`
Execute supplied code against supplied data, see JavascriptEngineTest for examples

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### JavascriptEngine

public JavascriptEngine()

## Method Details

### execute

public String execute(String code, String jsonData) throws IOException
Execute supplied code against supplied data, see JavascriptEngineTest for examples

Throws:
  `IOException`