Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
62 lines (51 sloc) 1.76 KB
/* Generated by apex-mocks-generator version 3.1.2 */
@isTest
public class Mocks
{
public class OpportunitiesSelector extends fflib_SObjectMocks.SObjectSelector implements IOpportunitiesSelector
{
private fflib_ApexMocks mocks;
public OpportunitiesSelector(fflib_ApexMocks mocks)
{
super(mocks);
this.mocks = mocks;
}
public List<Opportunity> selectByIdWithProducts(Set<ID> idSet)
{
return (List<Opportunity>) mocks.mockNonVoidMethod(this, 'selectByIdWithProducts', new List<Type> {Opportunity.class}, new List<Object> {idSet});
}
}
public class Opportunities extends fflib_SObjectMocks.SObjectDomain implements IOpportunities
{
private fflib_ApexMocks mocks;
public Opportunities(fflib_ApexMocks mocks)
{
super(mocks);
this.mocks = mocks;
}
public void applyDiscount(Decimal discountPercentage, fflib_ISObjectUnitOfWork uow)
{
mocks.mockVoidMethod(this, 'applyDiscount', new List<Type>(), new List<Object> {discountPercentage, uow});
}
}
public class OpportunitiesService implements IOpportunitiesService
{
private fflib_ApexMocks mocks;
public OpportunitiesService(fflib_ApexMocks mocks)
{
this.mocks = mocks;
}
public void applyDiscounts(Set<ID> opportunityIds, Decimal discountPercentage)
{
mocks.mockVoidMethod(this, 'applyDiscounts', new List<Type>(), new List<Object> {opportunityIds, discountPercentage});
}
public Set<Id> createInvoices(Set<ID> opportunityIds, Decimal discountPercentage)
{
return (Set<Id>) mocks.mockNonVoidMethod(this, 'createInvoices', new List<Type> {ID.class}, new List<Object> {opportunityIds, discountPercentage});
}
public Id submitInvoicingJob()
{
return (Id) mocks.mockNonVoidMethod(this, 'submitInvoicingJob', new List<Type> {ID.class}, new List<Object>());
}
}
}