|
@@ -2,21 +2,19 @@ package com.macro.mall.portal;
|
|
|
|
|
|
import com.macro.mall.portal.dao.PortalProductDao;
|
|
|
import com.macro.mall.portal.domain.PromotionProduct;
|
|
|
-import org.junit.Assert;
|
|
|
-import org.junit.Test;
|
|
|
-import org.junit.runner.RunWith;
|
|
|
+import org.junit.jupiter.api.Test;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
|
-import org.springframework.test.context.junit4.SpringRunner;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
+import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
|
+
|
|
|
/**
|
|
|
* Created by macro on 2018/8/27.
|
|
|
* 前台商品查询逻辑单元测试
|
|
|
*/
|
|
|
-@RunWith(SpringRunner.class)
|
|
|
@SpringBootTest
|
|
|
public class PortalProductDaoTests {
|
|
|
@Autowired
|
|
@@ -29,6 +27,6 @@ public class PortalProductDaoTests {
|
|
|
ids.add(28L);
|
|
|
ids.add(29L);
|
|
|
List<PromotionProduct> promotionProductList = portalProductDao.getPromotionProductList(ids);
|
|
|
- Assert.assertEquals(4,promotionProductList.size());
|
|
|
+ assertEquals(4,promotionProductList.size());
|
|
|
}
|
|
|
}
|