public static class TestGenerator.TestFunctionGenerator extends Object
Modifier and Type | Field and Description |
---|---|
static int |
VALUE_SPACE_LENGTH |
Constructor and Description |
---|
TestFunctionGenerator(BiConsumer<String,String> importsAcceptor,
PackageID currentPkgId,
BInvokableType invokableType) |
TestFunctionGenerator(BiConsumer<String,String> importsAcceptor,
PackageID currentPkgId,
BLangFunction function) |
TestFunctionGenerator(BiConsumer<String,String> importsAcceptor,
PackageID currentPkgId,
BLangFunctionTypeNode type) |
Modifier and Type | Method and Description |
---|---|
String |
getDataProviderReturnType()
Returns string of type of params of the data provider function.
|
String |
getDataProviderReturnValue()
Returns return value of the data provider function.
|
String[] |
getNamesSpace()
Returns the names space of the test function (including expected return param name).
|
String |
getTargetFuncInvocation()
Returns target function invocation string.
|
List<String> |
getTargetFuncInvocations()
Returns a list of target function invocations.
|
String |
getTargetFuncReturnType()
Returns return type of the target function.
|
String |
getTestFuncParams()
Returns parameters of the test function separated by comma.
|
String[] |
getTypeSpace()
Returns the types space of the test function (including expected return type).
|
String[][] |
getValueSpace()
Returns the value space of the test function (including expected return value).
|
public static final int VALUE_SPACE_LENGTH
public TestFunctionGenerator(BiConsumer<String,String> importsAcceptor, PackageID currentPkgId, BLangFunction function)
public TestFunctionGenerator(BiConsumer<String,String> importsAcceptor, PackageID currentPkgId, BLangFunctionTypeNode type)
public TestFunctionGenerator(BiConsumer<String,String> importsAcceptor, PackageID currentPkgId, BInvokableType invokableType)
public String getTestFuncParams()
eg. int x, int y
public List<String> getTargetFuncInvocations()
eg. ["foo(5, 20)","foo(100, 30)"]
public String getTargetFuncInvocation()
eg. foo(x, y)
public String getDataProviderReturnType()
eg. (int, float)[]
public String getTargetFuncReturnType()
eg. (int, int)
public String getDataProviderReturnValue()
eg. [(1, 0.5),(-1, 2.5)]
public String[][] getValueSpace()
public String[] getTypeSpace()
public String[] getNamesSpace()
Copyright © 2019 WSO2. All rights reserved.