From 08a21f49f2eaf9cfc19ceb67b196cc36ba689305 Mon Sep 17 00:00:00 2001 From: buli <137736985@qq.com> Date: 星期五, 13 五月 2022 20:52:25 +0800 Subject: [PATCH] FIxSWOPageIssue --- force-app/main/default/classes/SoqlHelperTest.cls | 40 +++++++--------------------------------- 1 files changed, 7 insertions(+), 33 deletions(-) diff --git a/force-app/main/default/classes/SoqlHelperTest.cls b/force-app/main/default/classes/SoqlHelperTest.cls index 17195b3..9e0f49b 100644 --- a/force-app/main/default/classes/SoqlHelperTest.cls +++ b/force-app/main/default/classes/SoqlHelperTest.cls @@ -2,44 +2,18 @@ private class SoqlHelperTest { static testMethod void testMethod1() { String sql = 'SELECT Id,Name FROM Contact WHERE Name != null Limit 1'; - Account accupdate = TestDataUtility.CreateAccounts(1)[0]; - accupdate.Name = 'update1'; - List<Account> updateAccList = new List<Account>(); - - //Profile p = [select Id from Profile where Name = 'System Administrator']; - Profile p = [select Id from Profile where Name = 'Chatter Free User']; - User hpOwner = new User( LastName = 'TestUserA', FirstName = 'owner', Alias = 'hp', CommunityNickname = 'hpOwner', Email = 'olympus_hpowner@sunbridge.com', Username = 'olympus_hpowner@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id); - List<User> userList = new List<User>(); - - userList.add(hpOwner); - - Contact con = TestDataUtility.CreateContacts(1)[0]; - List<String> conidList = new List<String>(); - conidList.add(con.Id); - - Set<String> strSet = new Set<String>(); - strSet.add('test1'); - strSet.add('test2'); - - List<AggregateResult> lartest = new List<AggregateResult>(); - //Repair__c repair1 = new Repair__c(); - //repair1.Name = 'test'; - //repair1.RecordTypeId = '0120K000000wOGcQAM'; - //insert repair1; - lartest = [select count(Id) total from Repair__c where RecordTypeId != null group by RecordTypeId]; - system.debug('lartest:'+lartest); - String key = 'test'; Test.startTest(); //ToInCondition //UpsertList + Set<string> strSet = new Set<string>{'12321','ewqewq'}; SoqlHelper.ToInCondition(strSet); - SoqlHelper.ToInCondition(lartest, key); + // SoqlHelper.ToInCondition(lartest, key); SoqlHelper.DistinctQueryFields(sql); - SoqlHelper.WId(sql); - SoqlHelper.InsertList(userList); - SoqlHelper.UpdateList(updateAccList); - SoqlHelper.DeleteList(updateAccList); - SoqlHelper.DeleteListAsync(conidList); + SoqlHelper.WId('wdeqdwqwq');/* + SoqlHelper.InsertList(new List<Contact>{con}); + SoqlHelper.UpdateList(new List<Contact>{con}); + SoqlHelper.DeleteList(new List<Contact>{con}); + SoqlHelper.DeleteListAsync(conidList);*/ Test.stopTest(); } -- Gitblit v1.9.1