-
Notifications
You must be signed in to change notification settings - Fork 0
/
ListHelperTest.java
42 lines (36 loc) · 1.25 KB
/
ListHelperTest.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* Copyright 2015-2016 Kullo GmbH. All rights reserved. */
package net.kullo.android.littlehelpers;
import android.test.AndroidTestCase;
import java.util.List;
public class ListHelperTest extends AndroidTestCase {
public void testSimple() {
{
int inValue = 333;
Integer expectedOutValue = 333;
List actual = ListHelper.asList(inValue);
assertEquals(actual.size(), 1);
assertEquals(actual.get(0), expectedOutValue);
}
{
long inValue = 333;
Long expectedOutValue = 333L;
List actual = ListHelper.asList(inValue);
assertEquals(actual.size(), 1);
assertEquals(actual.get(0), expectedOutValue);
}
{
Long inValue = 333L;
Long expectedOutValue = 333L;
List actual = ListHelper.asList(inValue);
assertEquals(actual.size(), 1);
assertEquals(actual.get(0), expectedOutValue);
}
{
String inValue = "foobar";
String expectedOutValue = "foobar";
List actual = ListHelper.asList(inValue);
assertEquals(actual.size(), 1);
assertEquals(actual.get(0), expectedOutValue);
}
}
}