File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
src/test/kotlin/application/service Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2023. Smart Operating Block
3
+ *
4
+ * Use of this source code is governed by an MIT-style
5
+ * license that can be found in the LICENSE file or at
6
+ * https://opensource.org/licenses/MIT.
7
+ */
8
+
9
+ package application.service
10
+
11
+ import application.controller.RoomController
12
+ import entity.zone.Room
13
+ import entity.zone.RoomID
14
+ import entity.zone.RoomType
15
+ import entity.zone.ZoneID
16
+ import infrastructure.digitaltwins.DigitalTwinManagerStub
17
+ import io.kotest.core.spec.style.StringSpec
18
+ import io.kotest.matchers.shouldBe
19
+ import io.kotest.matchers.shouldNotBe
20
+
21
+ class ServiceTest : StringSpec ({
22
+ var roomController = RoomController (DigitalTwinManagerStub ())
23
+ val exampleRoom = Room (RoomID ("r1"), RoomType .OPERATING_ROOM , ZoneID ("z1"))
24
+
25
+ beforeEach {
26
+ // Re-initalize the digital twin manager stub.
27
+ roomController = RoomController (DigitalTwinManagerStub ())
28
+ }
29
+
30
+ " I should be able to create a room" {
31
+ val result = Service .CreateRoom (exampleRoom, roomController).execute()
32
+ result shouldNotBe null
33
+ Service .GetRoom (exampleRoom.id, roomController).execute() shouldBe exampleRoom
34
+ }
35
+ })
You can’t perform that action at this time.
0 commit comments