コード例 #1
0
 /** Test of getAsObject method, of class StringConverter. */
 @Test
 public void testGetAsObjectWhenValueIsAValidString() {
   String value = "valid string";
   Object result = stringConverter.getAsObject(facesContext, component, value);
   assertEquals(value, result);
 }
コード例 #2
0
 /** Test of getAsObject method, of class StringConverter. */
 @Test
 public void testGetAsObjectWhenValueIsNull() {
   String value = "";
   Object result = stringConverter.getAsObject(facesContext, component, value);
   assertNull(result);
 }