Skip to content

Commit b3b2eb4

Browse files
committed
Tests added
1 parent 2e815a0 commit b3b2eb4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/test/scala/com/sfxcode/nosql/mongo/dao/StudentDAOSpec.scala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ import better.files.{File, Resource}
44
import com.sfxcode.nosql.MongoImplicits
55
import com.sfxcode.nosql.mongo._
66
import com.sfxcode.nosql.mongo.model.Student
7+
import com.sfxcode.nosql.mongo.test.UniversityDatabase
78
import com.sfxcode.nosql.mongo.test.UniversityDatabase.{GradeDAO, StudentDAO}
89
import org.specs2.mutable.Specification
9-
import org.specs2.specification.BeforeAll
10+
import org.specs2.specification.core.Fragments
11+
import org.specs2.specification.{AfterAll, AfterSpec, BeforeAll}
1012

11-
class StudentDAOSpec extends Specification with BeforeAll with MongoImplicits {
13+
class StudentDAOSpec extends Specification with BeforeAll with AfterAll with MongoImplicits {
1214
sequential
1315

1416
override def beforeAll(): Unit = {
@@ -34,4 +36,7 @@ class StudentDAOSpec extends Specification with BeforeAll with MongoImplicits {
3436

3537
}
3638
}
39+
40+
override def afterAll(): Unit =
41+
UniversityDatabase.LocalTestServer.shutdown()
3742
}

0 commit comments

Comments
 (0)