1package tests.api.java.net;
2
3import junit.framework.TestCase;
4
5import java.net.SocketTimeoutException;
6
7import dalvik.annotation.TestLevel;
8import dalvik.annotation.TestTargetClass;
9import dalvik.annotation.TestTargetNew;
10
11@TestTargetClass(SocketTimeoutException.class)
12public class SocketTimeoutExceptionTest extends TestCase {
13
14
15    @TestTargetNew(
16        level = TestLevel.COMPLETE,
17        notes = "",
18        method = "SocketTimeoutException",
19        args = {}
20    )
21    public void test_Constructor() {
22        SocketTimeoutException ste = new SocketTimeoutException();
23        assertNull(ste.getMessage());
24    }
25
26    @TestTargetNew(
27        level = TestLevel.COMPLETE,
28        notes = "",
29        method = "SocketTimeoutException",
30        args = {String.class}
31    )
32    public void test_ConstructorLString() {
33
34        String [] strs = {"", null, "Test String"};
35        for(String str:strs) {
36            SocketTimeoutException ste = new SocketTimeoutException(str);
37            assertEquals(str, ste.getMessage());
38        }
39    }
40}
41