This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fp_tdd | |
import org.scalacheck.Prop.forAll | |
import org.scalacheck.{Gen, Properties} | |
object Chapter03 extends Properties("Ch03") { | |
// ======== TODO ======== | |
// $5 + 10 CHF = $10 if rate is 2:1 | |
// Make "amount" private | |
// Money rounding? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fp_tdd | |
import cats.Apply | |
import cats.syntax.apply._ | |
import org.scalacheck.Prop.forAll | |
import org.scalacheck.{Gen, Properties} | |
object Chapter04 extends Properties("Ch04") { | |
// ======== TODO ======== | |
// $5 + 10 CHF = $10 if rate is 2:1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fp_tdd | |
import cats.Apply | |
import cats.syntax.apply._ | |
import org.scalacheck.Prop.forAll | |
import org.scalacheck.{Gen, Prop, Properties} | |
object Chapter05 extends Properties("Ch05") { | |
// ======== TODO ======== | |
// $5 + 10 CHF = $10 if rate is 2:1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fp_tdd | |
import cats.Apply | |
import cats.syntax.apply._ | |
import org.scalacheck.Prop.forAll | |
import org.scalacheck.{Gen, Prop, Properties} | |
/* | |
* Dollar と Franc で共通の Money クラスを作り equalsを引き上げた | |
* テストコードのは変更はなし |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fp_tdd | |
import cats.Apply | |
import cats.syntax.apply._ | |
import org.scalacheck.Prop.forAll | |
import org.scalacheck.{Gen, Prop, Properties} | |
object Chapter07 extends Properties("Ch07") { | |
// ======== TODO ======== | |
// $5 + 10 CHF = $10 if rate is 2:1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fp_tdd | |
import cats.Apply | |
import cats.syntax.apply._ | |
import org.scalacheck.Prop.forAll | |
import org.scalacheck.{Arbitrary, Gen, Properties} | |
object Chapter08 extends Properties("Ch08") { | |
// ======== TODO ======== | |
// $5 + 10 CHF = $10 if rate is 2:1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fp_tdd | |
import cats.Apply | |
import cats.syntax.apply._ | |
import org.scalacheck.Prop.forAll | |
import org.scalacheck.{Arbitrary, Gen, Properties} | |
object Chapter09 extends Properties("Ch09") { | |
// ======== TODO ======== | |
// $5 + 10 CHF = $10 if rate is 2:1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fp_tdd | |
import cats.Apply | |
import cats.syntax.apply._ | |
import org.scalacheck.Prop.forAll | |
import org.scalacheck.{Arbitrary, Gen, Properties} | |
object Chapter10 extends Properties("Ch10") { | |
// ======== TODO ======== | |
// $5 + 10 CHF = $10 if rate is 2:1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fp_tdd | |
import cats.Apply | |
import cats.syntax.apply._ | |
import org.scalacheck.Prop.forAll | |
import org.scalacheck.{Arbitrary, Gen, Properties} | |
object Chapter12 extends Properties("Ch12") { | |
// ======== TODO ======== | |
// $5 + 10 CHF = $10 if rate is 2:1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fp_tdd | |
import cats.Apply | |
import cats.syntax.apply._ | |
import org.scalacheck.Prop.forAll | |
import org.scalacheck.{Arbitrary, Gen, Properties} | |
object Chapter13 extends Properties("Ch13") { | |
// ======== TODO ======== | |
// $5 + 10 CHF = $10 if rate is 2:1 |