Created
December 16, 2013 16:37
-
-
Save pellekrogholt/7990029 to your computer and use it in GitHub Desktop.
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
test("Test empty tree 'Contains'") { | |
// behind the scene this on create a node actor - follow props: Props(classOf[BinaryTreeNode], elem, initiallyRemoved) | |
val testNode = system.actorOf(BinaryTreeNode.props(0, true)) | |
testNode ! Contains(testActor, id = 1, 0) | |
expectMsg(ContainsResult(1, false)) | |
} | |
test("Test empty tree 'Insert'") { | |
val testNode = system.actorOf(BinaryTreeNode.props(0, true)) | |
testNode ! Insert(testActor, id = 1, 42) | |
expectMsg(OperationFinished(1)) | |
testNode ! Contains(testActor, id = 2, 42) | |
expectMsg(ContainsResult(2, true)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment