高章伟
2023-03-03 d8dc84a3d56df839895f1c417a4d9cbee763d262
force-app/main/default/classes/UpdateContractAimAmountHandlerTest.cls
@@ -1,6 +1,6 @@
@isTest
private class UpdateContractAimAmountHandlerTest {
   @isTest static void test_method_one() {
      // Implement test code
      Account account2 = new Account();
@@ -15,10 +15,13 @@
        contact2.LastName = 'test1经销商';
        insert contact2;
        String loginId = UserInfo.getUserId();
        Profile p = [select Id from Profile where Name = '901_经销商活动系统' ];
        User user = new User();
        User thisUser= [select Id from User where Id=:UserInfo.getUserId()];
System.runAs (thisUser){
        User sys = [select id from User where Id = :loginId];
        User user = new User(Test_staff__c = true);
        user.isActive = true;
        //user.isActive = true;
        user.ProfileId = p.Id;
        user.ContactId = contact2.Id;
        user.FirstName = 'ユーザー';
@@ -32,6 +35,8 @@
        user.Alias = 'テユ';
        user.CommunityNickname = 'テストユーザー';
        insert user;
    }
      Account account = new Account();
      account.RecordTypeId = '01210000000QjCNAA0';