Search in sources :

Example 6 with DdlResult

use of com.alibaba.otter.canal.parse.inbound.mysql.ddl.DdlResult in project canal by alibaba.

the class DdlResultTest method toStringOutputNotNull.

// Test written by Diffblue Cover.
@Test
public void toStringOutputNotNull() {
    // Arrange
    final DdlResult objectUnderTest = new DdlResult();
    // Act
    final String actual = objectUnderTest.toString();
    // Assert result
    Assert.assertEquals("DdlResult [schemaName=null , tableName=null , oriSchemaName=null , oriTableName=null , type=null ];", actual);
}
Also used : DdlResult(com.alibaba.otter.canal.parse.inbound.mysql.ddl.DdlResult) Test(org.junit.Test)

Example 7 with DdlResult

use of com.alibaba.otter.canal.parse.inbound.mysql.ddl.DdlResult in project canal by alibaba.

the class DdlResultTest method getOriSchemaNameOutputNull.

// Test written by Diffblue Cover.
@Test
public void getOriSchemaNameOutputNull() {
    // Arrange
    final DdlResult objectUnderTest = new DdlResult();
    // Act
    final String actual = objectUnderTest.getOriSchemaName();
    // Assert result
    Assert.assertNull(actual);
}
Also used : DdlResult(com.alibaba.otter.canal.parse.inbound.mysql.ddl.DdlResult) Test(org.junit.Test)

Example 8 with DdlResult

use of com.alibaba.otter.canal.parse.inbound.mysql.ddl.DdlResult in project canal by alibaba.

the class DdlResultTest method constructorInputNotNullNotNullNotNullNotNullOutputVoid.

// Test written by Diffblue Cover.
@Test
public void constructorInputNotNullNotNullNotNullNotNullOutputVoid() {
    // Arrange
    final String schemaName = "foo";
    final String tableName = "\'";
    final String oriSchemaName = "1a 2b 3c";
    final String oriTableName = "BAZ";
    // Act, creating object to test constructor
    final DdlResult objectUnderTest = new DdlResult(schemaName, tableName, oriSchemaName, oriTableName);
    // Assert side effects
    Assert.assertEquals("foo", objectUnderTest.getSchemaName());
    Assert.assertEquals("1a 2b 3c", objectUnderTest.getOriSchemaName());
    Assert.assertEquals("\'", objectUnderTest.getTableName());
    Assert.assertEquals("BAZ", objectUnderTest.getOriTableName());
}
Also used : DdlResult(com.alibaba.otter.canal.parse.inbound.mysql.ddl.DdlResult) Test(org.junit.Test)

Example 9 with DdlResult

use of com.alibaba.otter.canal.parse.inbound.mysql.ddl.DdlResult in project canal by alibaba.

the class DdlResultTest method constructorInputNotNullOutputVoid.

// Test written by Diffblue Cover.
@Test
public void constructorInputNotNullOutputVoid() {
    // Arrange
    final String schemaName = "3";
    // Act, creating object to test constructor
    final DdlResult objectUnderTest = new DdlResult(schemaName);
    // Assert side effects
    Assert.assertEquals("3", objectUnderTest.getSchemaName());
}
Also used : DdlResult(com.alibaba.otter.canal.parse.inbound.mysql.ddl.DdlResult) Test(org.junit.Test)

Example 10 with DdlResult

use of com.alibaba.otter.canal.parse.inbound.mysql.ddl.DdlResult in project canal by alibaba.

the class DdlResultTest method getSchemaNameOutputNull.

// Test written by Diffblue Cover.
@Test
public void getSchemaNameOutputNull() {
    // Arrange
    final DdlResult objectUnderTest = new DdlResult();
    // Act
    final String actual = objectUnderTest.getSchemaName();
    // Assert result
    Assert.assertNull(actual);
}
Also used : DdlResult(com.alibaba.otter.canal.parse.inbound.mysql.ddl.DdlResult) Test(org.junit.Test)

Aggregations

DdlResult (com.alibaba.otter.canal.parse.inbound.mysql.ddl.DdlResult)33 Test (org.junit.Test)29 CanalParseException (com.alibaba.otter.canal.parse.exception.CanalParseException)3 ByteString (com.google.protobuf.ByteString)3 EventType (com.alibaba.otter.canal.protocol.CanalEntry.EventType)2 MetaHistoryDO (com.alibaba.otter.canal.parse.inbound.mysql.tsdb.dao.MetaHistoryDO)1 Header (com.alibaba.otter.canal.protocol.CanalEntry.Header)1 RowChange (com.alibaba.otter.canal.protocol.CanalEntry.RowChange)1 TransactionBegin (com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin)1 TransactionEnd (com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd)1 EntryPosition (com.alibaba.otter.canal.protocol.position.EntryPosition)1 LogHeader (com.taobao.tddl.dbsync.binlog.event.LogHeader)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 HashMap (java.util.HashMap)1 List (java.util.List)1