public abstract class KnockoutTCK extends Object
@ServiceProvider(service = KnockoutTCK.class) public final class MyKnockoutBindingTest extends KnockoutTCK {@Overrideprotected BrwsrCtx createContext() { // useContextBuilder.build(); }@Factorypublic static Object[] create() { return VMTest.newTests().withClasses(testClasses()()).build(); } }
| Modifier | Constructor and Description |
|---|---|
protected |
KnockoutTCK() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canFailWebSocketTest()
Some implementations cannot fully support web sockets and fail.
|
abstract BrwsrCtx |
createContext()
Implement to create new context for the test.
|
abstract Object |
createJSON(Map<String,Object> values)
Create a JSON object as seen by the technology
|
abstract Object |
executeScript(String script,
Object[] arguments)
Executes script in the context of current window
|
abstract URI |
prepareURL(String content,
String mimeType,
String[] parameters)
Creates a URL which later returns content with given
mimeType and content. |
protected static Class<?>[] |
testClasses()
Gives you list of classes included in the TCK.
|
public abstract BrwsrCtx createContext()
ContextBuilder to implement context for your technology.public abstract Object createJSON(Map<String,Object> values)
values - mapping from names to values of propertiespublic abstract Object executeScript(String script, Object[] arguments)
script - the JavaScript code to executearguments - arguments sent to the script (can be referenced as arguments[0])public abstract URI prepareURL(String content, String mimeType, String[] parameters)
mimeType and content. The
content may be processed by the provided parameters.content - mimeType - parameters - protected static Class<?>[] testClasses()
KOTest annotation. The methods are public
instance methods that take no arguments.KOTest annotationpublic boolean canFailWebSocketTest()
Copyright © 2014 NetBeans. All Rights Reserved.