File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
src/test/kotlin/application/service Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -32,4 +32,27 @@ class ServiceTest : StringSpec({
3232 result shouldNotBe null
3333 Service .GetRoom (exampleRoom.id, roomController).execute() shouldBe exampleRoom
3434 }
35+
36+ " I should be able to delete an existing room" {
37+ Service .CreateRoom (exampleRoom, roomController).execute()
38+ val result = Service .DeleteRoom (exampleRoom.id, roomController).execute()
39+ result shouldBe true
40+ Service .GetRoom (exampleRoom.id, roomController).execute() shouldBe null
41+ }
42+
43+ " If a room does not exist, then call delete on it result in a failed request" {
44+ val result = Service .DeleteRoom (exampleRoom.id, roomController).execute()
45+ result shouldBe false
46+ }
47+
48+ " I should be able to get the state of an existing room" {
49+ Service .CreateRoom (exampleRoom, roomController).execute()
50+ val result = Service .GetRoom (exampleRoom.id, roomController).execute()
51+ result shouldBe exampleRoom
52+ }
53+
54+ " If a room does not exist, a request on its state, must return null" {
55+ val result = Service .GetRoom (exampleRoom.id, roomController).execute()
56+ result shouldBe null
57+ }
3558})
You can’t perform that action at this time.
0 commit comments