From e6068da47c1bef5517c9e5fdc8c726766867ad4e Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期五, 14 七月 2023 15:10:02 +0800
Subject: [PATCH] Merge branch 'master' into LEXUpgrade2023-Deloitte

---
 force-app/main/default/classes/LexSaleOrderControllerTest.cls |  153 ++++++++------------------------------------------
 1 files changed, 25 insertions(+), 128 deletions(-)

diff --git a/force-app/main/default/classes/LexSaleOrderControllerTest.cls b/force-app/main/default/classes/LexSaleOrderControllerTest.cls
index ea7b9ce..9b69f41 100644
--- a/force-app/main/default/classes/LexSaleOrderControllerTest.cls
+++ b/force-app/main/default/classes/LexSaleOrderControllerTest.cls
@@ -14,27 +14,15 @@
         User userTest;
         User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
         System.runAs(thisUser) {
-            List<RecordType> rectCo = [
-                SELECT Id
-                FROM RecordType
-                WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
-            ];
+            List<RecordType> rectCo = [SELECT Id FROM RecordType WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'];
             if (rectCo.size() == 0) {
                 return;
             }
-            List<RecordType> rectHp = [
-                SELECT Id
-                FROM RecordType
-                WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
-            ];
+            List<RecordType> rectHp = [SELECT Id FROM RecordType WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'];
             if (rectHp.size() == 0) {
                 return;
             }
-            Profile prof = [
-                SELECT Id
-                FROM Profile
-                WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
-            ];
+            Profile prof = [SELECT Id FROM Profile WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'];
             accountItem1 = new Account(Name = 'Testaccount001', RecordTypeId = rectCo[0].Id, AgentCode_Ext__c = '9999900');
             insert accountItem1;
             accountItem2 = new Account(Name = 'Testaccount002', RecordTypeId = rectHp[0].Id, AgentCode_Ext__c = '9999999');
@@ -64,20 +52,11 @@
         }
         System.runAs(userTest) {
             String Id = UserInfo.getUserId();
-            User thisUserInfo = [
-                SELECT accountid, ContactId, Contact.AccountId, Work_Location__c
-                FROM User
-                WHERE id = :Id
-            ];
+            User thisUserInfo = [SELECT accountid, ContactId, Contact.AccountId, Work_Location__c FROM User WHERE id = :Id];
             String accountId = thisUserInfo.Contact.AccountId;
             String userWorkLocation = thisUserInfo.Work_Location__c;
             String accountName;
-            Account[] accountInfo = [
-                SELECT Name
-                FROM account
-                WHERE id = :accountId
-                LIMIT 1
-            ];
+            Account[] accountInfo = [SELECT Name FROM account WHERE id = :accountId LIMIT 1];
             if (accountInfo.size() > 0) {
                 accountName = accountInfo[0].Name;
             }
@@ -317,24 +296,12 @@
         User MyUser_Test;
         User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
         System.runAs(thisUser) {
-            List<RecordType> rectCo = [
-                SELECT Id
-                FROM RecordType
-                WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
-            ];
+            List<RecordType> rectCo = [SELECT Id FROM RecordType WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'];
             if (rectCo.size() == 0) {
                 return;
             }
-            Profile prof = [
-                SELECT Id
-                FROM Profile
-                WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
-            ];
-            RecordType hosCo = [
-                SELECT Id
-                FROM RecordType
-                WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
-            ];
+            Profile prof = [SELECT Id FROM Profile WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'];
+            RecordType hosCo = [SELECT Id FROM RecordType WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'];
             olympus = new Account(RecordTypeId = hosCo.Id, AgentCode_Ext__c = '9999900', Name = 'olympus');
             insert olympus;
             myAccount2 = new Account(Name = 'Testaccount002', Dealer_discount__c = 20, RecordTypeId = rectCo[0].Id);
@@ -364,11 +331,7 @@
         }
         System.runAs(MyUser_Test) {
             String Id = UserInfo.getUserId();
-            User thisUserInfo = [
-                SELECT accountid, ContactId, Contact.AccountId, Work_Location__c
-                FROM User
-                WHERE id = :Id
-            ];
+            User thisUserInfo = [SELECT accountid, ContactId, Contact.AccountId, Work_Location__c FROM User WHERE id = :Id];
             String accountId = thisUserInfo.Contact.AccountId;
             String userWorkLocation1 = thisUserInfo.Work_Location__c;
             String accountName = myAccount2.Name;
@@ -663,24 +626,12 @@
     @isTest
     static void testProSale() {
         StaticParameter.EscapeConsumableOrderDetail2Trigger = true;
-        List<RecordType> rectCo = [
-            SELECT Id
-            FROM RecordType
-            WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
-        ];
+        List<RecordType> rectCo = [SELECT Id FROM RecordType WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'];
         if (rectCo.size() == 0) {
             return;
         }
-        Profile prof = [
-            SELECT Id
-            FROM Profile
-            WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
-        ];
-        RecordType hosCo = [
-            SELECT Id
-            FROM RecordType
-            WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
-        ];
+        Profile prof = [SELECT Id FROM Profile WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'];
+        RecordType hosCo = [SELECT Id FROM RecordType WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'];
         Account olympus = new Account(RecordTypeId = hosCo.Id, AgentCode_Ext__c = '9999900', Name = 'olympus');
         insert olympus;
         Account myAccount2 = new Account(name = 'Testaccount002', Dealer_discount__c = 20, RecordTypeId = rectCo[0].Id);
@@ -706,20 +657,11 @@
         }
         System.runAs(MyUser_Test) {
             String Id = UserInfo.getUserId();
-            User thisUserInfo = [
-                SELECT accountid, ContactId, Contact.AccountId, Work_Location__c
-                FROM User
-                WHERE id = :Id
-            ];
+            User thisUserInfo = [SELECT accountid, ContactId, Contact.AccountId, Work_Location__c FROM User WHERE id = :Id];
             String accountId = thisUserInfo.Contact.AccountId;
             String userWorkLocation = thisUserInfo.Work_Location__c;
             String accountName;
-            Account[] accountInfo = [
-                SELECT Name
-                FROM account
-                WHERE id = :accountId
-                LIMIT 1
-            ];
+            Account[] accountInfo = [SELECT Name FROM account WHERE id = :accountId LIMIT 1];
             if (accountInfo.size() > 0) {
                 accountName = accountInfo[0].Name;
             }
@@ -949,24 +891,12 @@
 
     @isTest
     static void testProdError() {
-        List<RecordType> rectCo = [
-            SELECT Id
-            FROM RecordType
-            WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
-        ];
+        List<RecordType> rectCo = [SELECT Id FROM RecordType WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'];
         if (rectCo.size() == 0) {
             return;
         }
-        Profile prof = [
-            SELECT Id
-            FROM Profile
-            WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
-        ];
-        RecordType hosCo = [
-            SELECT Id
-            FROM RecordType
-            WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
-        ];
+        Profile prof = [SELECT Id FROM Profile WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'];
+        RecordType hosCo = [SELECT Id FROM RecordType WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'];
         Account olympus = new Account(RecordTypeId = hosCo.Id, AgentCode_Ext__c = '9999900', Name = 'olympus');
         insert olympus;
         Account myAccount2 = new Account(name = 'Testaccount002', Dealer_discount__c = 20, RecordTypeId = rectCo[0].Id);
@@ -992,20 +922,11 @@
         //璁㈠崟
         System.runAs(MyUser_Test) {
             String Id = UserInfo.getUserId();
-            User thisUserInfo = [
-                SELECT accountid, ContactId, Contact.AccountId, Work_Location__c
-                FROM User
-                WHERE id = :Id
-            ];
+            User thisUserInfo = [SELECT accountid, ContactId, Contact.AccountId, Work_Location__c FROM User WHERE id = :Id];
             String accountId = thisUserInfo.Contact.AccountId;
             String userWorkLocation = thisUserInfo.Work_Location__c;
             String accountName;
-            Account[] accountInfo = [
-                SELECT Name
-                FROM account
-                WHERE id = :accountId
-                LIMIT 1
-            ];
+            Account[] accountInfo = [SELECT Name FROM account WHERE id = :accountId LIMIT 1];
             if (accountInfo.size() > 0) {
                 accountName = accountInfo[0].Name;
             }
@@ -1208,19 +1129,11 @@
 
     @isTest
     static void searchTest1() {
-        List<RecordType> rectCo = [
-            SELECT Id
-            FROM RecordType
-            WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
-        ];
+        List<RecordType> rectCo = [SELECT Id FROM RecordType WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'];
         if (rectCo.size() == 0) {
             return;
         }
-        Profile prof = [
-            SELECT Id
-            FROM Profile
-            WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
-        ];
+        Profile prof = [SELECT Id FROM Profile WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'];
         Account myAccount2 = new Account(
             name = 'Testaccount002',
             Dealer_discount__c = 20,
@@ -1381,19 +1294,11 @@
 
     @isTest
     static void searchTest2() {
-        List<RecordType> rectCo = [
-            SELECT Id
-            FROM RecordType
-            WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
-        ];
+        List<RecordType> rectCo = [SELECT Id FROM RecordType WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'];
         if (rectCo.size() == 0) {
             return;
         }
-        Profile prof = [
-            SELECT Id
-            FROM Profile
-            WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
-        ];
+        Profile prof = [SELECT Id FROM Profile WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'];
         Account myAccount2 = new Account(
             name = 'Testaccount002',
             Dealer_discount__c = 20,
@@ -1523,19 +1428,11 @@
 
     @isTest
     static void searchTest3() {
-        List<RecordType> rectCo = [
-            SELECT Id
-            FROM RecordType
-            WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
-        ];
+        List<RecordType> rectCo = [SELECT Id FROM RecordType WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'];
         if (rectCo.size() == 0) {
             return;
         }
-        Profile prof = [
-            SELECT Id
-            FROM Profile
-            WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
-        ];
+        Profile prof = [SELECT Id FROM Profile WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'];
         Account myAccount2 = new Account(
             name = 'Testaccount002',
             Dealer_discount__c = 20,

--
Gitblit v1.9.1