Search in sources :

Example 1 with StringKvString

use of com.torodb.kvdocument.values.heap.StringKvString in project torodb by torodb.

the class PostgreSqlValueToCopyConverterTest method testStringWithBackslash.

@Test
public void testStringWithBackslash() {
    new StringKvString("a string with a \\").accept(visitor, sb);
    assertEquals("a string with a \\\\", sb.toString());
}
Also used : StringKvString(com.torodb.kvdocument.values.heap.StringKvString) Test(org.junit.Test)

Example 2 with StringKvString

use of com.torodb.kvdocument.values.heap.StringKvString in project torodb by torodb.

the class PostgreSqlValueToCopyConverterTest method testStringWithNewLine.

@Test
public void testStringWithNewLine() {
    new StringKvString("a string with a \n").accept(visitor, sb);
    assertEquals("a string with a \\\n", sb.toString());
}
Also used : StringKvString(com.torodb.kvdocument.values.heap.StringKvString) Test(org.junit.Test)

Example 3 with StringKvString

use of com.torodb.kvdocument.values.heap.StringKvString in project torodb by torodb.

the class PostgreSqlValueToCopyConverterTest method testStringSimple.

@Test
public void testStringSimple() {
    new StringKvString("simple string").accept(visitor, sb);
    assertEquals("simple string", sb.toString());
}
Also used : StringKvString(com.torodb.kvdocument.values.heap.StringKvString) Test(org.junit.Test)

Example 4 with StringKvString

use of com.torodb.kvdocument.values.heap.StringKvString in project torodb by torodb.

the class PostgreSqlValueToCopyConverterTest method testStringNull.

@Test
public void testStringNull() {
    new StringKvString("a string with a \\N and null literal").accept(visitor, sb);
    assertEquals("a string with a \\\\N and null literal", sb.toString());
}
Also used : StringKvString(com.torodb.kvdocument.values.heap.StringKvString) Test(org.junit.Test)

Example 5 with StringKvString

use of com.torodb.kvdocument.values.heap.StringKvString in project torodb by torodb.

the class PostgreSqlValueToCopyConverterTest method testStringWithTab.

@Test
public void testStringWithTab() {
    new StringKvString("a string with a \t").accept(visitor, sb);
    assertEquals("a string with a \\\t", sb.toString());
}
Also used : StringKvString(com.torodb.kvdocument.values.heap.StringKvString) Test(org.junit.Test)

Aggregations

StringKvString (com.torodb.kvdocument.values.heap.StringKvString)6 Test (org.junit.Test)6