ByteTinyType { @Override public String toString() { return String.format("%s#%s", this.getClass().getSimpleName(), value); } ByteTinyType(byte value); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); final byte value; }
@Test public void toStringContainsTTName() { final String expected = "Byte"; final String toString = Samples.Byte.of((byte) 1).toString(); Assert.assertTrue(toString.contains(expected)); }
@Test public void toStringContainsTTValue() { final String expected = "1"; final String toString = Samples.Byte.of((byte) 1).toString(); Assert.assertTrue(toString.contains(expected)); }