本文整理汇总了TypeScript中src/service/simulation.Simulation.runCalculation方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Simulation.runCalculation方法的具体用法?TypeScript Simulation.runCalculation怎么用?TypeScript Simulation.runCalculation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类src/service/simulation.Simulation
的用法示例。
在下文中一共展示了Simulation.runCalculation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it('should be the sum of the retirement balances of the accounts for the calculation output', () => {
let retirementAccount = new Account(1, 'Retirement account', '401k', 10000, 1200, 25, 25, 50);
let hsaAccount = new Account(2, 'HSA account', 'HSA', 1000, 500, 75, 25, 0);
let retirementAccountRetirementBalance = Simulation.retirementBalance(retirementAccount, 10);
let hsaAccountRetirementBalance = Simulation.retirementBalance(hsaAccount, 10);
let user:User = new User(1, "John", "Doe", 58, 68, 50000, [retirementAccount, hsaAccount]);
let calculationOutput = Simulation.runCalculation(new CalculationInput(user));
expect(calculationOutput.simulationResult.totalRetirementBalance).toBe(retirementAccountRetirementBalance + hsaAccountRetirementBalance);
})