Add getDecimalById to fflib_SObjects2
Signed-off-by: WimVelzeboer <william@velzeboer.nl>
This commit is contained in:
@@ -165,6 +165,16 @@ private class fflib_SObjects2Test
|
||||
System.Assert.isNull(result.get(caseIdC), 'Case Id B should have no related Account Id');
|
||||
}
|
||||
|
||||
@IsTest
|
||||
static void itShouldReturnDecimalById() {
|
||||
final Id accountId = fflib_IDGenerator.generate(Schema.Account.SObjectType);
|
||||
final Account record = new Account(Id = accountId, AnnualRevenue = 123.45);
|
||||
fflib_SObjects2 domain = new fflib_SObjects2(new List<Account>{ record });
|
||||
System.Test.startTest();
|
||||
Map<Id, Decimal> result = domain.getDecimalById(Schema.Account.AnnualRevenue, Schema.Account.Id);
|
||||
System.Test.stopTest();
|
||||
}
|
||||
|
||||
@IsTest
|
||||
static void itShouldReturnStringById()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user