use of org.ballerinalang.model.values.BString in project ballerina by ballerina-lang.
the class SQLActionsTest method testGeneratedKeyOnInsert.
@Test(groups = "ConnectorTest")
public void testGeneratedKeyOnInsert() {
BValue[] returns = BRunUtil.invoke(result, "testGeneratedKeyOnInsert");
BString retValue = (BString) returns[0];
Assert.assertTrue(Integer.parseInt(retValue.stringValue()) > 0);
}
use of org.ballerinalang.model.values.BString in project ballerina by ballerina-lang.
the class SQLActionsTest method testCallProcedureWithMultipleResultSets.
@Test(groups = "ConnectorTest")
public void testCallProcedureWithMultipleResultSets() {
BValue[] returns = BRunUtil.invoke(result, "testCallProcedureWithMultipleResultSets");
BString retValue = (BString) returns[0];
final String expected = "Peter";
BString retValue2 = (BString) returns[1];
final String expected2 = "John";
Assert.assertEquals(retValue.stringValue(), expected);
Assert.assertEquals(retValue2.stringValue(), expected2);
}
use of org.ballerinalang.model.values.BString in project ballerina by ballerina-lang.
the class SQLActionsTest method testGeneratedKeyWithColumn.
@Test(groups = "ConnectorTest")
public void testGeneratedKeyWithColumn() {
BValue[] returns = BRunUtil.invoke(result, "testGeneratedKeyWithColumn");
BString retValue = (BString) returns[0];
Assert.assertTrue(Integer.parseInt(retValue.stringValue()) > 0);
}
use of org.ballerinalang.model.values.BString in project ballerina by ballerina-lang.
the class SQLActionsTest method testQueryParameters.
@Test(groups = "ConnectorTest")
public void testQueryParameters() {
BValue[] returns = BRunUtil.invoke(result, "testQueryParameters");
BString retValue = (BString) returns[0];
final String expected = "Peter";
Assert.assertEquals(retValue.stringValue(), expected);
}
use of org.ballerinalang.model.values.BString in project ballerina by ballerina-lang.
the class SQLActionsTest method testStructOutParameters.
@Test(groups = "ConnectorTest")
public void testStructOutParameters() {
BValue[] returns = BRunUtil.invoke(result, "testStructOutParameters");
BString retValue = (BString) returns[0];
String expected = "10";
Assert.assertEquals(retValue.stringValue(), expected);
}
Aggregations