public abstract class KnockoutTCK extends Object
@ServiceProvider
(service = KnockoutTCK.class) public final class MyKnockoutBindingTest extends KnockoutTCK {@Override
protected BrwsrCtx createContext() { // useContexts.Builder
.build
(); }@org.testng.annotations.Factory
public static Object[] create() { return VMTest.newTests().withClasses(KnockoutTCK.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
|
URI |
prepareURL(String content,
String mimeType,
String[] parameters)
Deprecated.
provide
KnockoutTCK.prepareWebResource(java.lang.String, java.lang.String, java.lang.String[])
implementation instead since post 1.4 version of HTML/Java API. |
String |
prepareWebResource(String content,
String mimeType,
String[] parameters)
Creates a URL which later returns content with given
mimeType and content . |
boolean |
scheduleLater(int delay,
Runnable r)
Schedules the given runnable to run later.
|
protected static Class<?>[] |
testClasses()
Gives you list of classes included in the TCK.
|
public abstract BrwsrCtx createContext()
Contexts.Builder
to set context for your technology up.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 String prepareWebResource(String content, String mimeType, String[] parameters)
mimeType
and content
. The
content may be processed by the provided parameters
.content
- what should be available on the URL. Can contain $0
$1
to reference parameters
by their positionmimeType
- the type of the resourceparameters
- names of parameters as reference by content
@Deprecated public URI prepareURL(String content, String mimeType, String[] parameters)
KnockoutTCK.prepareWebResource(java.lang.String, java.lang.String, java.lang.String[])
implementation instead since post 1.4 version of HTML/Java API.protected static Class<?>[] testClasses()
KOTest
annotation. The methods are public
instance methods that take no arguments.KOTest
annotationpublic boolean canFailWebSocketTest()
public boolean scheduleLater(int delay, Runnable r)
delay
- the delay in millisecondsr
- the runnable to runtrue
if the runnable was really scheduled,
false
otherwiseCopyright © 2018 NetBeans. All rights reserved.