use of org.ballerinalang.model.values.BString in project ballerina by ballerina-lang.
the class StringTest method testReplaceAllNull.
@Test(expectedExceptions = { BLangRuntimeException.class }, expectedExceptionsMessageRegExp = ".*error:.*NullReferenceException.*")
public void testReplaceAllNull() {
BValue[] args = { new BString("abc is not abc as abc anymore"), new BString(null), new BString("xyz") };
BRunUtil.invoke(result, "replaceAll", args);
}
use of org.ballerinalang.model.values.BString in project ballerina by ballerina-lang.
the class StringTest method testEqualsIgnoreCase.
@Test
public void testEqualsIgnoreCase() {
BValue[] args = { new BString("WSO2"), new BString("wso2") };
BRunUtil.invoke(result, "equalsIgnoreCase", args);
}
use of org.ballerinalang.model.values.BString in project ballerina by ballerina-lang.
the class StringTest method testReplaceAllByNull.
@Test(expectedExceptions = { BLangRuntimeException.class }, expectedExceptionsMessageRegExp = ".*error:.*NullReferenceException.*")
public void testReplaceAllByNull() {
BValue[] args = { new BString("abc is not abc as abc anymore"), new BString("abc"), new BString(null) };
BRunUtil.invoke(result, "replaceAll", args);
}
use of org.ballerinalang.model.values.BString in project ballerina by ballerina-lang.
the class StringTest method testContains.
@Test
public void testContains() {
BValue[] args = { new BString(s1), new BString("WSO2") };
BValue[] returns = BRunUtil.invoke(result, "contains", args);
}
use of org.ballerinalang.model.values.BString in project ballerina by ballerina-lang.
the class StringTest method testSplitByNull.
@Test(expectedExceptions = { BLangRuntimeException.class }, expectedExceptionsMessageRegExp = ".*error:.*NullReferenceException.*")
public void testSplitByNull() {
BValue[] args = { new BString("name1 name2 name3"), new BString(null) };
BRunUtil.invoke(result, "split", args);
}
Aggregations