###Personal sandbox
-
Test for output stream:
For testing functionality of a function with side effect we can use
spy
ormock
to access the changes that are applying to system. Thus, it is necessary to use composition for accessing those methods(output stream)See
Printer.scala
andPrinterSpecs.scala
-
Test for calculating the area of a triangle:
As dots of a triangle are global properties with a wide range of inputs, the best solution for testing is property testing
See
Triangle.scala
andTriangleSpecs.scala
-
The third item
It had done with standard Scala API for reading file
See
LeagueRanking.scala
andLeagueRankingSpecs.scala