public abstract class AbstractTestTemplate extends Object implements TestTemplate
Modifier and Type | Field and Description |
---|---|
protected BLangPackage |
builtTestFile |
protected static String |
DEFAULT_IP |
protected static String |
DEFAULT_PORT |
protected BiConsumer<Integer,Integer> |
focusLineAcceptor |
protected static String |
HTTP |
protected static String |
HTTPS |
protected List<org.apache.commons.lang3.tuple.Pair<String,String>> |
imports |
protected static String |
WS |
protected static String |
WSS |
Constructor and Description |
---|
AbstractTestTemplate(BLangPackage builtTestFile,
BiConsumer<Integer,Integer> focusLineAcceptor) |
Modifier and Type | Method and Description |
---|---|
protected Optional<String> |
findServicePort(BLangTypeInit init)
Find service port.
|
protected String |
getSafeName(String name)
Returns a conflict free name.
|
protected boolean |
isNonExistImport(String orgName,
String alias)
Returns True if import is non existent, False otherwise.
|
protected boolean |
isSecureService(BLangTypeInit init)
Check for secure service.
|
protected static String |
lowerCaseFirstLetter(String name)
Lowercase the first letter of this string.
|
protected static String |
upperCaseFirstLetter(String name)
Uppercase case the first letter of this string.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
render
protected static final String DEFAULT_IP
protected static final String DEFAULT_PORT
protected static final String HTTP
protected static final String HTTPS
protected static final String WS
protected static final String WSS
protected final BiConsumer<Integer,Integer> focusLineAcceptor
protected final BLangPackage builtTestFile
public AbstractTestTemplate(BLangPackage builtTestFile, BiConsumer<Integer,Integer> focusLineAcceptor)
protected static String upperCaseFirstLetter(String name)
name
- name to be convertedprotected static String lowerCaseFirstLetter(String name)
name
- name to be convertedprotected boolean isNonExistImport(String orgName, String alias)
orgName
- package organization namealias
- package aliasprotected String getSafeName(String name)
name
- variable nameprotected boolean isSecureService(BLangTypeInit init)
init
- BLangTypeInit
protected Optional<String> findServicePort(BLangTypeInit init)
init
- BLangTypeInit
Copyright © 2019 WSO2. All rights reserved.