| | |
| | | import org.testng.annotations.Test; |
| | | |
| | | import static org.testng.Assert.*; |
| | | |
| | | import org.opends.messages.Message; |
| | | |
| | | |
| | | /** |
| | |
| | | @Test() |
| | | public void testConstructor1() |
| | | { |
| | | new ASN1Exception(1, "Test"); |
| | | new ASN1Exception(Message.raw("Test")); |
| | | } |
| | | |
| | | |
| | |
| | | @Test() |
| | | public void testConstructor2() |
| | | { |
| | | new ASN1Exception(1, "Test", new Exception()); |
| | | new ASN1Exception(Message.raw("Test"), new Exception()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Tests the <CODE>getMessageID</CODE> method. |
| | | */ |
| | | @Test |
| | | public void testGetMessageID() |
| | | { |
| | | for (int i=0; i < 100; i++) |
| | | { |
| | | ASN1Exception e = new ASN1Exception(i, "Test"); |
| | | assertEquals(e.getMessageID(), i); |
| | | } |
| | | } |
| | | } |
| | | |