Money#parseString throws NotImplementedError
Opened this issue · 1 comments
vlovgr commented
import squants.market._
Money.parseString("1000 USD")
// scala.NotImplementedError: an implementation is missing
hunterpayne commented
Add this to the Money object in Money.scala:
override def parseString(s: String): Try[Money] = apply(s)
Then add this to MoneySpec.scala:
it should "handle round trip parsing of money as a string" in {
// Issue #321
val money = Money(1000d, USD)
Money(money.toString)
// Issue #322
Money.parseString("1000 USD")
}
Make sure it all works on your end, then submit a PR...