Add method overload for getIdFieldValues to omit null values

This commit is contained in:
Wim Velzeboer
2024-04-10 10:28:59 +01:00
parent 64559fdbe5
commit 273e47f0db
2 changed files with 33 additions and 4 deletions
@@ -105,7 +105,7 @@ private class fflib_SObjects2Test
domain.getFieldsByField(Account.Id, Account.AnnualRevenue);
domain.getFieldByField(Account.Id, Account.Id);
domain.getIdFieldsByIdField(Account.Id, Account.Id);
domain.getIdFieldsByStringField(Account.Name, Account.Id);
domain.getIdFieldsByStringField(Account.Id, Account.Name);
domain.getIdFieldValues(Account.Id);
domain.getIdFieldValues(Account.Id, criteria);
domain.getDecimalFieldValues(Account.BillingLatitude, criteria);
@@ -117,8 +117,16 @@ private class fflib_SObjects2Test
domain.getSObjectsByStringField(Account.Name);
domain.getStringFieldByStringField(Account.Name, Account.AccountNumber);
domain.getStringFieldValues(Account.Name, criteria);
domain.stri
domain.stripInaccessibleFields();
domain.getDateFieldValues(Account.CreatedDate);
domain.getDateFieldValues(Account.CreatedDate, criteria);
domain.getIdFieldValues(Account.Id, criteria);
domain.getRecords(Account.Id, domain.getFirstSObject().Id);
domain.getRecords(Account.Name, 'A');
domain.getRecordsIsNot(Account.Name, 'A');
domain.getRecordsIsNot(Account.Id, domain.getFirstSObject().Id);
domain.getSObjectByIdField(Account.Id);
domain.getIdFieldValues(Account.Id, true);
// todo - add assertions
}
@@ -462,7 +470,6 @@ private class fflib_SObjects2Test
);
}
@IsTest
static void itShouldReturnRecordsIds()
{