1   package jp.liq.container.reflect;
2   
3   import static org.junit.Assert.*;
4   import jp.liq.container.reflect.ReflectException.Reason;
5   
6   import org.junit.Test;
7   
8   public class ReflectExceptionTest {
9       private ReflectException exception;
10      @Test
11      public void getLocalizedMessege() {
12          exception = new ReflectException(null, null, Reason.FAILED_TO_GET_FIELD);
13          assertNotNull(exception.getLocalizedMessage());
14  
15          exception = new ReflectException(null, null, Reason.FAILED_TO_SET_FIELD);
16          assertNotNull(exception.getLocalizedMessage());
17  
18          exception = new ReflectException(null, null, Reason.FAILED_TO_INVOKE_CONSTRUCTOR);
19          assertNotNull(exception.getLocalizedMessage());
20  
21          exception = new ReflectException(null, null, Reason.FAILED_TO_INVOKE_METHOD);
22          assertNotNull(exception.getLocalizedMessage());
23  
24      }
25  }