Skip to content

Commit a442c38

Browse files
committed
Merge pull request #13 from JAertgeerts/master
Updated deprecated mockVoidMethod & mockNonVoidMethod
2 parents 467a5af + 29ec51d commit a442c38

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

fflib-sample-code/src/classes/Mocks.cls

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class Mocks
1515

1616
public List<Opportunity> selectByIdWithProducts(Set<ID> idSet)
1717
{
18-
return (List<Opportunity>) mocks.mockNonVoidMethod(this, 'selectByIdWithProducts', new List<Object> {idSet});
18+
return (List<Opportunity>) mocks.mockNonVoidMethod(this, 'selectByIdWithProducts', new List<Type> {Opportunity.class}, new List<Object> {idSet});
1919
}
2020
}
2121

@@ -31,7 +31,7 @@ public class Mocks
3131

3232
public void applyDiscount(Decimal discountPercentage, fflib_ISObjectUnitOfWork uow)
3333
{
34-
mocks.mockVoidMethod(this, 'applyDiscount', new List<Object> {discountPercentage, uow});
34+
mocks.mockVoidMethod(this, 'applyDiscount', new List<Type>(), new List<Object> {discountPercentage, uow});
3535
}
3636
}
3737

@@ -46,17 +46,17 @@ public class Mocks
4646

4747
public void applyDiscounts(Set<ID> opportunityIds, Decimal discountPercentage)
4848
{
49-
mocks.mockVoidMethod(this, 'applyDiscounts', new List<Object> {opportunityIds, discountPercentage});
49+
mocks.mockVoidMethod(this, 'applyDiscounts', new List<Type>(), new List<Object> {opportunityIds, discountPercentage});
5050
}
5151

5252
public Set<Id> createInvoices(Set<ID> opportunityIds, Decimal discountPercentage)
5353
{
54-
return (Set<Id>) mocks.mockNonVoidMethod(this, 'createInvoices', new List<Object> {opportunityIds, discountPercentage});
54+
return (Set<Id>) mocks.mockNonVoidMethod(this, 'createInvoices', new List<Type> {ID.class}, new List<Object> {opportunityIds, discountPercentage});
5555
}
5656

5757
public Id submitInvoicingJob()
5858
{
59-
return (Id) mocks.mockNonVoidMethod(this, 'submitInvoicingJob', new List<Object> {});
59+
return (Id) mocks.mockNonVoidMethod(this, 'submitInvoicingJob', new List<Type> {ID.class}, new List<Object>());
6060
}
6161
}
6262
}

0 commit comments

Comments
 (0)