test.java.com.ibm.cloudant.kafka.connect.CloudantSinkConnectorTest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kafka-connect-cloudant Show documentation
Show all versions of kafka-connect-cloudant Show documentation
Apache Kafka Connect API connector for Cloudant
The newest version!
/*
* Copyright © 2016, 2018 IBM Corp. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.ibm.cloudant.kafka.connect;
import com.ibm.cloudant.kafka.common.InterfaceConst;
import com.ibm.cloudant.kafka.connect.utils.ConnectorUtils;
import junit.framework.TestCase;
import org.apache.kafka.connect.connector.ConnectorContext;
import org.junit.Assert;
import org.powermock.api.easymock.PowerMock;
import java.util.List;
import java.util.Map;
/**
* @author holger
*/
public class CloudantSinkConnectorTest extends TestCase {
private CloudantSinkConnector connector;
private Map targetProperties;
protected void setUp() throws Exception {
super.setUp();
targetProperties = ConnectorUtils.getTargetProperties();
connector = new CloudantSinkConnector();
ConnectorContext context = PowerMock.createMock(ConnectorContext.class);
connector.initialize(context);
}
public void testTaskConfigsInt() {
PowerMock.replayAll();
connector.start(targetProperties);
PowerMock.verifyAll();
}
public void testConfig() {
PowerMock.replayAll();
connector.start(targetProperties);
List