buli
2023-07-14 744f42c5496e656a1f9927740a3b37c0b97a6cba
force-app/main/default/classes/LookupSearchResultTest.cls
@@ -2,20 +2,11 @@
private class LookupSearchResultTest {
  @testSetup
  static void testInfo() {
    List<RecordType> rectCo = [
      SELECT Id
      FROM RecordType
      WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '販売店'
    ];
        List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店'];
    if (rectCo.size() == 0) {
      return;
    }
    Account myAccount2 = new Account(
      name = 'Account001',
      Dealer_discount__c = 20,
      RecordTypeId = rectCo[0].Id,
      AgentCode_Ext__c = '2'
    );
        Account myAccount2 = new Account(name='Account001',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '2');
    insert myAccount2;
  }
@@ -23,31 +14,14 @@
  static void testLookupSearchResult() {
    String id = '';
    String title = '';
    List<Account> account = [
      SELECT Id, Name
      FROM Account
      WHERE Name = 'Account001'
      LIMIT 1
    ];
      List<Account> account = [SELECT Id,Name FROM Account WHERE Name = 'Account001' limit 1];
    for (Account acc : account) {
      id = acc.Id;
    }
    object compareTo = account;
    LookupSearchResult resultA = new LookupSearchResult(
      id,
      'Account',
      'standard:account',
      'Account',
      'Account'
    );
        LookupSearchResult resultA = new LookupSearchResult(id, 'Account', 'standard:account', 'Account', 'Account');
    LookupSearchResult resultB = new LookupSearchResult('', '', '', title, '');
    LookupSearchResult resultC = new LookupSearchResult(
      id,
      'Account',
      'standard:account',
      title,
      'Account'
    );
        LookupSearchResult resultC = new LookupSearchResult(id, 'Account', 'standard:account', title, 'Account');
    System.Test.startTest();
    resultA.getId();
    resultA.getSObjectType();