parent
e25ba3895d
commit
ce78a4eb0b
@ -1,4 +1,4 @@
|
|||||||
package cn.iocoder.mall.order;
|
package cn.iocoder.mall.order.biz;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
package cn.iocoder.mall.order.biz.mapper;
|
||||||
|
|
||||||
|
import cn.iocoder.mall.order.biz.OrderApplicationTest;
|
||||||
|
import cn.iocoder.mall.order.biz.dao.OrderMapper;
|
||||||
|
import cn.iocoder.mall.order.biz.dataobject.OrderDO;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import org.junit.Assert;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
import org.springframework.test.context.junit4.SpringRunner;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mapper test
|
||||||
|
*
|
||||||
|
* @author Sin
|
||||||
|
* @time 2019/5/13 10:45 PM
|
||||||
|
*/
|
||||||
|
@RunWith(SpringRunner.class)
|
||||||
|
@SpringBootTest(classes = OrderApplicationTest.class)
|
||||||
|
@Transactional
|
||||||
|
public class OrderMapperTest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private OrderMapper orderMapper;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void updateByIdTest() {
|
||||||
|
int id = 47;
|
||||||
|
// int updateStatus = 99;
|
||||||
|
// int res = orderMapper.update(new OrderDO().setStatus(id), new UpdateWrapper<OrderDO>().eq("id", updateStatus));
|
||||||
|
OrderDO orderDO = orderMapper.selectById(id);
|
||||||
|
// Assert.assertTrue(orderDO.getStatus() == updateStatus);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in new issue