File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/collections Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ package aws.smithy.kotlin.runtime.collections
2+
3+ import kotlin.test.Test
4+ import kotlin.test.assertEquals
5+ import kotlin.test.assertNotEquals
6+
7+ class CaseInsensitiveStringTest {
8+ @Test
9+ fun testEquality () {
10+ val left = " Banana" .toInsensitive()
11+ val right = " baNAna" .toInsensitive()
12+ assertEquals(left, right)
13+ assertNotEquals<Any >(" Banana" , left)
14+ assertNotEquals<Any >(" baNAna" , right)
15+
16+ val nonMatching = " apple" .toInsensitive()
17+ assertNotEquals(nonMatching, left)
18+ assertNotEquals(nonMatching, right)
19+ }
20+
21+ @Test
22+ fun testProperties () {
23+ val s = " BANANA" .toInsensitive()
24+ assertEquals(" BANANA" , s.original)
25+ assertEquals(" banana" , s.normalized)
26+ }
27+ }
You can’t perform that action at this time.
0 commit comments