You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/07/08 06:53:53 UTC

[GitHub] [dubbo-samples] htynkn commented on a change in pull request #343: [WIP] add mybatis sample

htynkn commented on a change in pull request #343:
URL: https://github.com/apache/dubbo-samples/pull/343#discussion_r665917950



##########
File path: dubbo-samples-boundary-test/dubbo-samples-mybatis/src/test/java/org/apache/dubbo/samples/boundary/mybatis/MybatisServiceIT.java
##########
@@ -0,0 +1,27 @@
+package org.apache.dubbo.samples.boundary.mybatis;
+
+import org.apache.dubbo.samples.boundary.mybatis.api.MybatisService;
+import org.apache.dubbo.samples.boundary.mybatis.api.User;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.IsNull.nullValue;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(locations = "classpath*:spring/mybatis-consumer.xml")
+public class MybatisServiceIT {
+    @Autowired
+    private MybatisService service;
+
+    @Test
+    public void findUser() throws Exception {
+        User user = service.findByUserId(1);
+
+        assertThat(user, not(nullValue()));

Review comment:
       yeah, you are right. fixed via b996041




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org