@Test public void testToString() { String string1 = dataType.toString(); String string2 = "{id: 1234, name: \"TestDataType\", isAbstract: false}"; assertEquals(string2, string1); }
@Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id: " + getId()).append(", "); sb.append("name: \"" + getName() + "\"").append(", "); sb.append("isAbstract: " + isAbstract); if (!getTaggedValues().isEmpty()) { sb.append(", "); sb.append("taggedValues: " + getTaggedValues()); } sb.append("}"); return sb.toString(); }
DataType extends NamespaceOwnedElement implements SimpleType { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id: " + getId()).append(", "); sb.append("name: \"" + getName() + "\"").append(", "); sb.append("isAbstract: " + isAbstract); if (!getTaggedValues().isEmpty()) { sb.append(", "); sb.append("taggedValues: " + getTaggedValues()); } sb.append("}"); return sb.toString(); } }
DataType extends NamespaceOwnedElement implements SimpleType { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id: " + getId()).append(", "); sb.append("name: \"" + getName() + "\"").append(", "); sb.append("isAbstract: " + isAbstract); if (!getTaggedValues().isEmpty()) { sb.append(", "); sb.append("taggedValues: " + getTaggedValues()); } sb.append("}"); return sb.toString(); } DataType(final Identifier id, final String name);  DataType(final Identifier id, final String name, final boolean isAbstract);  DataType(final Identifier id, final String name, final boolean isAbstract,
            final List<TaggedValue> taggedValues); }
DataType extends NamespaceOwnedElement implements SimpleType { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id: " + getId()).append(", "); sb.append("name: \"" + getName() + "\"").append(", "); sb.append("isAbstract: " + isAbstract); if (!getTaggedValues().isEmpty()) { sb.append(", "); sb.append("taggedValues: " + getTaggedValues()); } sb.append("}"); return sb.toString(); } DataType(final Identifier id, final String name);  DataType(final Identifier id, final String name, final boolean isAbstract);  DataType(final Identifier id, final String name, final boolean isAbstract,
            final List<TaggedValue> taggedValues); @Override void accept(final Visitor visitor); @Override List<EnumLiteral> getLiterals(); @Override boolean isAbstract(); @Override boolean isClassType(); @Override boolean isDataType(); @Override boolean isEnumType(); @Override String toString(); }
DataType extends NamespaceOwnedElement implements SimpleType { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id: " + getId()).append(", "); sb.append("name: \"" + getName() + "\"").append(", "); sb.append("isAbstract: " + isAbstract); if (!getTaggedValues().isEmpty()) { sb.append(", "); sb.append("taggedValues: " + getTaggedValues()); } sb.append("}"); return sb.toString(); } DataType(final Identifier id, final String name);  DataType(final Identifier id, final String name, final boolean isAbstract);  DataType(final Identifier id, final String name, final boolean isAbstract,
            final List<TaggedValue> taggedValues); @Override void accept(final Visitor visitor); @Override List<EnumLiteral> getLiterals(); @Override boolean isAbstract(); @Override boolean isClassType(); @Override boolean isDataType(); @Override boolean isEnumType(); @Override String toString();  }