SoftVersionTest.java
776 Bytes
package com.xkl.upsoft;
import com.xkl.Constants;
import com.xkl.HttpTools;
import com.xkl.RtnCodeTools;
import org.junit.Assert;
import org.junit.Test;
import java.util.HashMap;
import java.util.Map;
/**
* 获取上传软件版本
* zhaoyue
* 2017-1-14
*/
public class SoftVersionTest {
private static final String URL_VERSION = Constants.URL_PREFIX + "/upsoft/version";
@Test
public void testVersion() {
Map<String, String> params = new HashMap<String, String>();
params.put("t", HttpTools.getNow());
String response = HttpTools.requestByMap(URL_VERSION, "GET", params);
Assert.assertTrue(RtnCodeTools.verifyCode(response, Constants.CODE_SUCC));
System.out.println("version info get success:" + response);
}
}