From 1727a4f4d02e429475608e60f142a63bc24127bc Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期一, 23 十月 2023 10:07:34 +0800
Subject: [PATCH] 近期修改
---
force-app/main/default/classes/NFM401ControllerTest.cls | 48 ++++++++++++++++++++++++++++++++++++++----------
1 files changed, 38 insertions(+), 10 deletions(-)
diff --git a/force-app/main/default/classes/NFM401ControllerTest.cls b/force-app/main/default/classes/NFM401ControllerTest.cls
index 3baaae2..3c25996 100644
--- a/force-app/main/default/classes/NFM401ControllerTest.cls
+++ b/force-app/main/default/classes/NFM401ControllerTest.cls
@@ -5,6 +5,7 @@
@testSetup
static void makeTestRepair() {
+ StaticParameter.EscapeQISTrigger = false;
List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '鐥呴櫌'];
if (rectCo.size() == 0) {
throw new ControllerUtil.myException('not found 鐥呴櫌 recodetype');
@@ -123,12 +124,25 @@
System.runAs(new User(Id = Userinfo.getUserId())){
insert rpr;
}
+ ContentVersion version = new ContentVersion();
+ version.Title = '123';
+ version.VersionData = EncodingUtil.base64Decode('test02');
+ version.ContentLocation = 's';
+ version.PathOnClient = '123.txt';
+ insert version;
+ version = [select ContentDocumentId from ContentVersion where Id =: version.Id];
+ ContentDocumentLink link = new ContentDocumentLink();
+ link.ContentDocumentId = version.ContentDocumentId;
+ link.LinkedEntityId = rpr.Id;
+ link.ShareType = 'I';
+ link.Visibility = 'AllUsers';
+ insert link;
- Attachment att = new Attachment();
- att.ParentId = rpr.Id;
- att.Name = 'test01';
- att.Body = EncodingUtil.base64Decode('test02');
- insert att;
+ // Attachment att = new Attachment();
+ // att.ParentId = rpr.Id;
+ // att.Name = 'test01';
+ // att.Body = EncodingUtil.base64Decode('test02');
+ // insert att;
qis = new QIS_Report__c();
@@ -146,11 +160,25 @@
qis.next_action__c = '鏃犲伩鏇存崲';
insert qis;
- Attachment att1 = new Attachment();
- att1.ParentId = qis.Id;
- att1.Name = 'test02';
- att1.Body = EncodingUtil.base64Decode('test02');
- insert att1;
+ // ContentVersion version1 = new ContentVersion();
+ // version1.Title = '123';
+ // version1.VersionData = EncodingUtil.base64Decode('test02');
+ // version1.ContentLocation = 's';
+ // version1.PathOnClient = '123.txt';
+ // insert version1;
+ // version1 = [select ContentDocumentId from ContentVersion where Id =: version1.Id];
+ // ContentDocumentLink link1 = new ContentDocumentLink();
+ // link1.ContentDocumentId = version1.ContentDocumentId;
+ // link1.LinkedEntityId = qis.Id;
+ // link1.ShareType = 'I';
+ // link1.Visibility = 'AllUsers';
+ // insert link;
+
+ // Attachment att1 = new Attachment();
+ // att1.ParentId = qis.Id;
+ // att1.Name = 'test02';
+ // att1.Body = EncodingUtil.base64Decode('test02');
+ // insert att1;
}
--
Gitblit v1.9.1