September 2018
Intermediate to advanced
398 pages
9h 43m
English
Firstly, we need to change the test associated with SimulatePlanApp. Open SimulatePlanAppIT.scala and change the content as follows:
package retcalcimport cats.data.Validated.{Invalid, Valid}import org.scalactic.TypeCheckedTripleEqualsimport org.scalatest.{Matchers, WordSpec}class SimulatePlanAppIT extends WordSpec with Matchers with TypeCheckedTripleEquals { "SimulatePlanApp.strMain" should { "simulate a retirement plan using market returns" in { val actualResult = SimulatePlanApp.strMain( Array("1952.09,2017.09", "25", "40", "3000", "2000", "10000")) val expectedResult = s""" |Capital after 25 years of savings: 468925 |Capital after 40 years in retirement: 2958842 |""".stripMargin actualResult should ===(Valid(expectedResult)) ...
Read now
Unlock full access