Skip to content

Instantly share code, notes, and snippets.

@jqno jqno/BoxTest.scala
Created Mar 1, 2012

What would you like to do?
Symmetry of Box's equals method
package net.liftweb.common
import org.junit.runner.RunWith
import org.scalatest.FlatSpec
import org.scalatest.junit.JUnitRunner
import org.scalatest.matchers.ShouldMatchers
class BoxTest extends FlatSpec with ShouldMatchers {
val foo = "foo"
val boxedFoo = Full(foo)
"Box" should "be symmetric" in {
(foo == boxedFoo) should equal (boxedFoo == foo)
it should "be recoverable from a collection???" in {
val list = List(boxedFoo)
(list contains foo) should be (true)
it should "be usable to recover something from a collection???" in {
val list = List(foo)
(list contains boxedFoo) should be (true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.