Skip to content

Commit

Permalink
remove hamcrest dep.
Browse files Browse the repository at this point in the history
  • Loading branch information
yanrongzhen committed Oct 26, 2023
1 parent bb06792 commit e009a26
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,4 @@ dependencies {

testImplementation "org.mockito:mockito-core"
testImplementation "org.mockito:mockito-junit-jupiter"
testImplementation libs.hamcrest
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

package org.apache.eventmesh.connector.spring.sink.connector;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.junit.jupiter.api.Assertions.assertNotNull;

import org.apache.eventmesh.connector.spring.sink.config.SpringSinkConfig;
Expand All @@ -30,6 +28,7 @@
import java.util.List;
import java.util.concurrent.BlockingQueue;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
Expand All @@ -51,7 +50,7 @@ public void setUp() throws Exception {

@Test
public void testSinkConnectorRunning() {
assertThat(connector.isRunning(), is(true));
Assertions.assertTrue(connector.isRunning());
}

@Test
Expand All @@ -60,12 +59,12 @@ public void testProcessRecordsInSinkConnectorQueue() throws Exception {
final String message = "testMessage";
writeMockedRecords(count, message);
BlockingQueue<ConnectRecord> queue = connector.getQueue();
assertThat(count, is(queue.size()));
Assertions.assertEquals(count, queue.size());
for (int i = 0; i < count; i++) {
ConnectRecord poll = queue.poll();
assertNotNull(poll);
String expectedMessage = message + i;
assertThat(poll.getData(), is(expectedMessage));
Assertions.assertEquals(poll.getData(), expectedMessage);
}
}

Expand Down
22 changes: 0 additions & 22 deletions gradle/libs.versions.toml

This file was deleted.

0 comments on commit e009a26

Please sign in to comment.