From 01f207d979d6be17c8cdec293feab48828c0ec3e Mon Sep 17 00:00:00 2001
From: 黄千龙 <huangqianlong@prec-tech.com>
Date: 星期五, 08 四月 2022 14:22:52 +0800
Subject: [PATCH] Merge branch 'master' of http://47.92.229.245:8089/r/OlyMEBG
---
force-app/main/default/classes/ConsumTrialPDFControllerTest.cls | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/force-app/main/default/classes/ConsumTrialPDFControllerTest.cls b/force-app/main/default/classes/ConsumTrialPDFControllerTest.cls
index f4f232d..d883890 100644
--- a/force-app/main/default/classes/ConsumTrialPDFControllerTest.cls
+++ b/force-app/main/default/classes/ConsumTrialPDFControllerTest.cls
@@ -2,6 +2,13 @@
private class ConsumTrialPDFControllerTest {
@testSetup
static void setupTestData() {
+
+ List<String> strList = new List<String>();
+ strList.add('Consum_Apply_Equipment_Set_Detail__c');
+ strList.add('Consum_Apply__c');
+ strList.add('Document');
+ TestDataUtility.CreatePIPolicyConfigurations(strList);
+
// 鐢ㄦ埛
User testUser1 = new User(Test_staff__c = true);
testUser1.LastName = 'TestLastName';
@@ -241,10 +248,15 @@
System.assertEquals(1, testAppList.size());
Consum_Apply__c testAppObj = testAppList[0];
PageReference ref = new PageReference('/apex/ConsumTrialPDF?Id=' + testAppObj.Id);
+ ref.getParameters().put('id',testAppObj.Id);
Test.setCurrentPage(ref);
ConsumTrialPDFController ctp = new ConsumTrialPDFController();
Test.startTest();
+ ctp.init();
+ ref.getParameters().put('id','');
+ ctp.init();
+ ref.getParameters().put('id','dokmqfqqvdqawhdsa');
ctp.init();
Test.stopTest();
@@ -261,7 +273,7 @@
// 鍙戣揣鍦板潃
System.assertEquals('鍖椾含甯�', ctp.shippmentAddress);
// 鎵�鏈塒DF椤甸泦鍚�
- System.assertEquals(1, ctp.pdfPageList.size());
+ System.assertEquals(3, ctp.pdfPageList.size());
ConsumTrialPDFController.PdfPageClass testPdfPage = ctp.pdfPageList[0];
Consum_Apply_Equipment_Set_Detail__c testDetail1 = testPdfPage.equipSetDetailList[0];
System.assertEquals('No02', testDetail1.Fixture_Model_No_F__c); // 鏄庣粏鍨嬪彿
--
Gitblit v1.9.1