Search in sources :

Example 6 with BInteger

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

the class AssertTest method testAssertStringArrayEquals3.

@Test(expectedExceptions = BLangRuntimeException.class, expectedExceptionsMessageRegExp = ".*expected " + "\\[\"A\", \"b\", \"C\"\\] but found \\[\"A\", \"B\", \"C\"\\].*")
public void testAssertStringArrayEquals3() {
    BValue[] args = { new BInteger(3) };
    BTestUtils.invoke(compileResult, "testAssertStringArrayEquals", args);
}
Also used : BValue(org.ballerinalang.model.values.BValue) BInteger(org.ballerinalang.model.values.BInteger) Test(org.testng.annotations.Test)

Example 7 with BInteger

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

the class SQLActionsTest method testNullINParameters.

@Test(groups = "ConnectorTest", enabled = false)
public void testNullINParameters() {
    BValue[] returns = BRunUtil.invoke(result, "testNullINParameters");
    BInteger retValue = (BInteger) returns[0];
    Assert.assertEquals(retValue.intValue(), 1);
}
Also used : BValue(org.ballerinalang.model.values.BValue) BInteger(org.ballerinalang.model.values.BInteger) Test(org.testng.annotations.Test)

Example 8 with BInteger

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

the class SQLActionsTest method testCreateTable.

@Test(groups = "ConnectorTest")
public void testCreateTable() {
    BValue[] returns = BRunUtil.invoke(result, "testCreateTable");
    BInteger retValue = (BInteger) returns[0];
    Assert.assertEquals(retValue.intValue(), 0);
}
Also used : BValue(org.ballerinalang.model.values.BValue) BInteger(org.ballerinalang.model.values.BInteger) Test(org.testng.annotations.Test)

Example 9 with BInteger

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

the class SQLActionsTest method testEmptySQLType.

@Test(groups = "ConnectorTest")
public void testEmptySQLType() {
    BValue[] returns = BRunUtil.invoke(result, "testEmptySQLType");
    BInteger retValue = (BInteger) returns[0];
    Assert.assertEquals(retValue.intValue(), 1);
}
Also used : BValue(org.ballerinalang.model.values.BValue) BInteger(org.ballerinalang.model.values.BInteger) Test(org.testng.annotations.Test)

Example 10 with BInteger

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

the class SQLActionsTest method testInsertTableDataWithParameters.

@Test(groups = "ConnectorTest")
public void testInsertTableDataWithParameters() {
    BValue[] returns = BRunUtil.invoke(result, "testInsertTableDataWithParameters");
    BInteger retValue = (BInteger) returns[0];
    Assert.assertEquals(retValue.intValue(), 1);
}
Also used : BValue(org.ballerinalang.model.values.BValue) BInteger(org.ballerinalang.model.values.BInteger) Test(org.testng.annotations.Test)

Aggregations

BInteger (org.ballerinalang.model.values.BInteger)364 BValue (org.ballerinalang.model.values.BValue)324 Test (org.testng.annotations.Test)305 BString (org.ballerinalang.model.values.BString)91 BFloat (org.ballerinalang.model.values.BFloat)55 BStruct (org.ballerinalang.model.values.BStruct)33 BBoolean (org.ballerinalang.model.values.BBoolean)24 BRefValueArray (org.ballerinalang.model.values.BRefValueArray)18 CompileResult (org.ballerinalang.launcher.util.CompileResult)12 BBlob (org.ballerinalang.model.values.BBlob)11 BeforeTest (org.testng.annotations.BeforeTest)11 BIntArray (org.ballerinalang.model.values.BIntArray)9 BMap (org.ballerinalang.model.values.BMap)9 BRefType (org.ballerinalang.model.values.BRefType)8 BStringArray (org.ballerinalang.model.values.BStringArray)8 BallerinaException (org.ballerinalang.util.exceptions.BallerinaException)8 BType (org.ballerinalang.model.types.BType)6 BStructType (org.ballerinalang.model.types.BStructType)4 BJSON (org.ballerinalang.model.values.BJSON)4 UnsupportedFieldTypeException (org.ballerinalang.net.grpc.exception.UnsupportedFieldTypeException)4