@isTest
|
private class ConsumApplyWebServiceTest {
|
|
// 造出已出库申请
|
static testMethod void testReceiveAll() {
|
ConsumTestDataFactory factory = new ConsumTestDataFactory();
|
factory.setupTestData();
|
factory.selectDetails();
|
factory.approve();
|
factory.defaultAssign();
|
factory.shippmentRequest();
|
factory.shipment();
|
|
Consum_Apply__c ca = [SELECT Id FROM Consum_Apply__c LIMIT 1];
|
List<Consum_Apply_Equipment_Set_Detail__c> caesdList = null;
|
caesdList = [SELECT Received_Confirm__c
|
, Loaner_received_time__c
|
FROM Consum_Apply_Equipment_Set_Detail__c];
|
System.assertEquals(null, caesdList[0].Received_Confirm__c);
|
System.assertEquals(null, caesdList[0].Loaner_received_time__c);
|
Test.startTest();
|
ConsumApplyWebService.all_received_fse(ca.Id);
|
Test.stopTest();
|
caesdList = [SELECT Received_Confirm__c
|
, Loaner_received_time__c
|
FROM Consum_Apply_Equipment_Set_Detail__c];
|
System.assertEquals('OK', caesdList[0].Received_Confirm__c);
|
System.assertNotEquals(null, caesdList[0].Loaner_received_time__c);
|
}
|
|
static testMethod void testCoverUp() {
|
ConsumApplyWebService.test();
|
}
|
}
|