标签:system ott private frame count ntb imp 类继承 ring
MallApplicationTests
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class MallApplicationTests {
}
其余测试类继承上述主类即可
import org.junit.Test;
public class CategoryMapperTest extends MallApplicationTests {
@Resource
private CategoryMapper categoryMapper;
@Test
public void countByExample() {
CategoryExample categoryExample = new CategoryExample();
categoryExample.or().andParentIdEqualTo(0);
long count = categoryMapper.countByExample(categoryExample);
System.out.println(count);
}
}
标签:system ott private frame count ntb imp 类继承 ring
原文地址:https://www.cnblogs.com/zenan/p/12056964.html