kylixs commented on a change in pull request #343:
URL: https://github.com/apache/dubbo-samples/pull/343#discussion_r665366325
##########
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:
It is recommended to check user.getName():
```
Assert.assertEquals(user.getName(), "apache dubbo");
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]