Skip to content

Commit 12f4f64

Browse files
Tidy up in preparation for tests
1 parent 5e38f34 commit 12f4f64

File tree

3 files changed

+75
-6
lines changed

3 files changed

+75
-6
lines changed

pom.xml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,7 @@
3434
<version>0.11.0.0</version>
3535
<scope>provided</scope>
3636
</dependency>
37-
<dependency>
38-
<groupId>junit</groupId>
39-
<artifactId>junit</artifactId>
40-
<version>3.8.1</version>
41-
<scope>test</scope>
42-
</dependency>
37+
4338
<dependency>
4439
<groupId>javax.jms</groupId>
4540
<artifactId>javax.jms-api</artifactId>
@@ -50,6 +45,19 @@
5045
<artifactId>allclient</artifactId>
5146
<version>9.0.0.1</version>
5247
</dependency>
48+
49+
<dependency>
50+
<groupId>junit</groupId>
51+
<artifactId>junit</artifactId>
52+
<version>4.12</version>
53+
<scope>test</scope>
54+
</dependency>
55+
<dependency>
56+
<groupId>org.slf4j</groupId>
57+
<artifactId>slf4j-log4j12</artifactId>
58+
<version>1.7.25</version>
59+
<scope>test</scope>
60+
</dependency>
5361
</dependencies>
5462

5563
<repositories>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
* Copyright 2017 IBM Corporation
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package com.ibm.mq.kafkaconnect;
17+
18+
import org.apache.kafka.connect.connector.Connector;
19+
import org.apache.kafka.connect.source.SourceConnector;
20+
import org.junit.Test;
21+
22+
import static org.junit.Assert.assertFalse;
23+
import static org.junit.Assert.assertTrue;
24+
import static org.junit.Assert.assertNotNull;
25+
26+
public class MQSourceConnectorTest {
27+
@Test
28+
public void testVersion() {
29+
String version = new MQSourceConnector().version();
30+
assertNotNull(version);
31+
assertFalse(version.isEmpty());
32+
}
33+
34+
@Test
35+
public void testConnectorType() {
36+
Connector connector = new MQSourceConnector();
37+
assertTrue(SourceConnector.class.isAssignableFrom(connector.getClass()));
38+
}
39+
}

test/resources/log4j.properties

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#
2+
# Copyright 2017 IBM Corporation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
log4j.rootLogger=DEBUG, stdout
17+
18+
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
19+
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
20+
log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c:%L)%n
21+
22+
log4j.logger.org.apache.kafka=ERROR

0 commit comments

Comments
 (0)