JBBPFieldString extends JBBPAbstractField { public String getAsString() { return this.str; } JBBPFieldString(final JBBPNamedFieldInfo name, final String nullableValue); String getAsString(); static String reverseBits(final String value); @Override String getTypeAsString(); static final String TYPE_NAME; }
@Test public void testGetAsString_NotNull() { final JBBPFieldString field = new JBBPFieldString(new JBBPNamedFieldInfo("test.field", "field", 123), "Huzzaa"); assertEquals("Huzzaa", field.getAsString()); }
@Test public void testGetAsString_Null() { final JBBPFieldString field = new JBBPFieldString(new JBBPNamedFieldInfo("test.field", "field", 123), null); assertNull(field.getAsString()); }