コード例 #1
0
 public void testForValue_primitive() throws Throwable {
   Answer<Object> answer = AnswerFactory.forValue(42);
   assertEquals(42, answer.answer(null));
 }
コード例 #2
0
 public void testForValue_object() throws Throwable {
   Object obj = new Object();
   Answer<Object> answer = AnswerFactory.forValue(obj);
   assertSame(obj, answer.answer(null));
 }
コード例 #3
0
 public void testForValue_null() throws Throwable {
   Answer<Object> answer = AnswerFactory.forValue(null);
   assertNull(answer.answer(null));
 }