fix[litemall-core]: 物流测试用例不正确

This commit is contained in:
Junling Bu
2018-10-30 23:00:38 +08:00
parent 3debeb035a
commit a13a230efe
2 changed files with 16 additions and 1 deletions

View File

@@ -85,4 +85,17 @@ public class ExpressInfo {
public void setShipperName(String shipperName) {
ShipperName = shipperName;
}
@Override
public String toString() {
return "ExpressInfo{" +
"LogisticCode='" + LogisticCode + '\'' +
", ShipperCode='" + ShipperCode + '\'' +
", Traces=" + Traces +
", State='" + State + '\'' +
", EBusinessID='" + EBusinessID + '\'' +
", Success=" + Success +
", ShipperName='" + ShipperName + '\'' +
'}';
}
}

View File

@@ -4,6 +4,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.linlinjava.litemall.core.express.ExpressService;
import org.linlinjava.litemall.core.express.dao.ExpressInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
@@ -12,10 +13,11 @@ import org.springframework.test.context.web.WebAppConfiguration;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = Application.class)
public class ExpressTest {
@Autowired
private ExpressService expressService;
@Test
public void test() {
ExpressService expressService = new ExpressService();
ExpressInfo ei = null;
try {
ei = expressService.getExpressInfo("YTO", "800669400640887922");