/** * 不检 * id 检定ID * backedReason 原因 * * */ public static HttpResponse <T> NotNeedVerificated <T>(long id, String backedReason) { InstrumentCheckInfo instrumentCheckInfo = new InstrumentCheckInfo(); instrumentCheckInfo.backedReason = backedReason; instrumentCheckInfo.acceptedStatus = InstrumentCheckInfo.STATUS_DO_NOT_NEED_CHECKED; HttpRequest httpRequest = HttpRequest.getInstance(); HttpResponse <T> httpResponse = httpRequest.Put <T>(MandatoryInstrumentCheckInfoApi.url + "/uploadByTechnicalInstitution/" + id.ToString(), instrumentCheckInfo); return(httpResponse); }
public void uploadByTechnicalInstitutionTest() { long id = 5703; // 检定ID InstrumentCheckInfo instrumentCheckInfo = new InstrumentCheckInfo(id); HttpResponse <object> result; result = MandatoryInstrumentCheckInfoApi.Back <object>(id, "测试原因"); Assert.AreEqual(result.status, 200); result = MandatoryInstrumentCheckInfoApi.NotNeedVerificated <object>(id, "测试原因"); Assert.AreEqual(result.status, 200); }