Skip to content

Commit 90395bd

Browse files
committed
Tests added
1 parent 2668cda commit 90395bd

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

src/test/scala/com/sfxcode/nosql/mongo/server/LocalServerSpec.scala

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.sfxcode.nosql.mongo.server
2+
3+
import org.specs2.mutable.Specification
4+
5+
class ServerConfigSpec extends Specification {
6+
7+
sequential
8+
9+
"ServerConfig" should {
10+
11+
"be created" in {
12+
val config = ServerConfig()
13+
config.host mustEqual "localhost"
14+
config.port mustEqual 28018
15+
config.serverName mustEqual "local-mongo-server"
16+
}
17+
18+
"be created from config path" in {
19+
val config = ServerConfig.fromPath("unit.test.local.mongo.server")
20+
config.host mustEqual "localhost"
21+
config.port mustEqual 28028
22+
config.serverName mustEqual "local-unit-test-server"
23+
config.h2BackendConfig.get.inMemory must beFalse
24+
config.h2BackendConfig.get.path mustEqual "/tmp/local-unit-test-server.mv"
25+
}
26+
}
27+
}

0 commit comments

Comments
 (0)