Search in sources :

Example 21 with BString

use of org.ballerinalang.model.values.BString in project ballerina by ballerina-lang.

the class SQLActionsTest method testArrayofQueryParameters.

@Test(groups = "ConnectorTest")
public void testArrayofQueryParameters() {
    BValue[] returns = BRunUtil.invoke(result, "testArrayofQueryParameters");
    BString retValue = (BString) returns[0];
    final String expected = "Peter";
    Assert.assertEquals(retValue.stringValue(), expected);
}
Also used : BValue(org.ballerinalang.model.values.BValue) BString(org.ballerinalang.model.values.BString) BString(org.ballerinalang.model.values.BString) Test(org.testng.annotations.Test)

Example 22 with BString

use of org.ballerinalang.model.values.BString in project ballerina by ballerina-lang.

the class SQLConnectorInitTest method testConnectorWithWorkers.

@Test
public void testConnectorWithWorkers() {
    BValue[] returns = BRunUtil.invoke(result, "testConnectorWithWorkers");
    BString retValue = (BString) returns[0];
    final String expected = "[{\"FIRSTNAME\":\"Peter\"}]";
    Assert.assertEquals(retValue.stringValue(), expected);
}
Also used : BValue(org.ballerinalang.model.values.BValue) BString(org.ballerinalang.model.values.BString) BString(org.ballerinalang.model.values.BString) Test(org.testng.annotations.Test)

Example 23 with BString

use of org.ballerinalang.model.values.BString in project ballerina by ballerina-lang.

the class SQLConnectorInitTest method testConnectionPoolProperties1.

@Test
public void testConnectionPoolProperties1() {
    BValue[] returns = BRunUtil.invoke(result, "testConnectionPoolProperties1");
    BString retValue = (BString) returns[0];
    final String expected = "[{\"FIRSTNAME\":\"Peter\"}]";
    Assert.assertEquals(retValue.stringValue(), expected);
}
Also used : BValue(org.ballerinalang.model.values.BValue) BString(org.ballerinalang.model.values.BString) BString(org.ballerinalang.model.values.BString) Test(org.testng.annotations.Test)

Example 24 with BString

use of org.ballerinalang.model.values.BString in project ballerina by ballerina-lang.

the class SQLConnectorInitTest method testConnectorWithDataSourceClassAndProps.

@Test
public void testConnectorWithDataSourceClassAndProps() {
    BValue[] returns = BRunUtil.invoke(result, "testConnectorWithDataSourceClassAndProps");
    BString retValue = (BString) returns[0];
    final String expected = "[{\"FIRSTNAME\":\"Peter\"}]";
    Assert.assertEquals(retValue.stringValue(), expected);
}
Also used : BValue(org.ballerinalang.model.values.BValue) BString(org.ballerinalang.model.values.BString) BString(org.ballerinalang.model.values.BString) Test(org.testng.annotations.Test)

Example 25 with BString

use of org.ballerinalang.model.values.BString in project ballerina by ballerina-lang.

the class SQLConnectorInitTest method testConnectionPoolProperties2.

@Test
public void testConnectionPoolProperties2() {
    BValue[] returns = BRunUtil.invoke(result, "testConnectionPoolProperties2");
    BString retValue = (BString) returns[0];
    final String expected = "[{\"FIRSTNAME\":\"Peter\"}]";
    Assert.assertEquals(retValue.stringValue(), expected);
}
Also used : BValue(org.ballerinalang.model.values.BValue) BString(org.ballerinalang.model.values.BString) BString(org.ballerinalang.model.values.BString) Test(org.testng.annotations.Test)

Aggregations

BString (org.ballerinalang.model.values.BString)418 BValue (org.ballerinalang.model.values.BValue)339 Test (org.testng.annotations.Test)321 BInteger (org.ballerinalang.model.values.BInteger)77 BStruct (org.ballerinalang.model.values.BStruct)76 BMap (org.ballerinalang.model.values.BMap)37 BBoolean (org.ballerinalang.model.values.BBoolean)36 BFloat (org.ballerinalang.model.values.BFloat)34 BJSON (org.ballerinalang.model.values.BJSON)28 BallerinaException (org.ballerinalang.util.exceptions.BallerinaException)21 BRefValueArray (org.ballerinalang.model.values.BRefValueArray)18 DefaultHttpHeaders (io.netty.handler.codec.http.DefaultHttpHeaders)11 HttpHeaders (io.netty.handler.codec.http.HttpHeaders)11 CompileResult (org.ballerinalang.launcher.util.CompileResult)11 BBlob (org.ballerinalang.model.values.BBlob)11 BStringArray (org.ballerinalang.model.values.BStringArray)11 BType (org.ballerinalang.model.types.BType)10 BIntArray (org.ballerinalang.model.values.BIntArray)9 BRefType (org.ballerinalang.model.values.BRefType)9 UnsupportedEncodingException (java.io.UnsupportedEncodingException)7