import { MutualFund } from "../src/Fund/MutualFund" ; import { Index } from "../src/Index/Index" ; import { Percentage } from "../src/Percentage" ; export class FundFactory { public createMutualFund ( totalExpenseRatio = 0.1 , dividendLeak = 0.2 , esgExclusionsPercentage = 0 , indexMarketCapPercentage = 80 ) { const index = this . createIndex ( indexMarketCapPercentage ) ; return new MutualFund ( 'Name' , 'SYM' , 'ISIN' , '' , new Percentage ( totalExpenseRatio ) , new Percentage ( 0 ) , new Percentage ( dividendLeak ) , index , '' , '' , new Percentage ( esgExclusionsPercentage ) ) ; } private createIndex ( marketCapPercentage ) { return new Index ( 'Index' , '' , '' , [ ] , new Percentage ( marketCapPercentage ) , '' ) ; } }