Merge branch 'release-0.9.7'
[Sone.git] / src / test / kotlin / net / pterodactylus / sone / utils / ObjectsTest.kt
1 package net.pterodactylus.sone.utils
2
3 import org.hamcrest.MatcherAssert.assertThat
4 import org.hamcrest.Matchers.contains
5 import org.hamcrest.Matchers.empty
6 import org.junit.Test
7
8 /**
9  * Unit test for Object utils.
10  */
11 class ObjectsTest {
12
13         @Test
14         fun `non-null value is turned into a list with one element`() {
15                 assertThat(5.asList(), contains(5))
16         }
17
18         @Test
19         fun `null value is turned into empty list`() {
20                 assertThat(null.asList(), empty())
21         }
22
23 }