Skip to content

Commit

Permalink
Small changes to AtlasDelta toDiffViewFriendlyString method (#193)
Browse files Browse the repository at this point in the history
* Added change reason to diff friendly string

* Small change to diff view printout for better viewability

* Reverted a test I accidentally changed

* Removed uneeded opening newline in diff print.

* Changed bracket to brace for more consistency
  • Loading branch information
lucaspcram authored and MikeGost committed Aug 9, 2018
1 parent 205907e commit c3d93b9
Showing 1 changed file with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ public static String toDiffViewFriendlyString(final Iterable<Diff> diffs)
{
final String newLine = System.getProperty("line.separator");
final StringBuilder builder = new StringBuilder();
builder.append("[Diffs: ");
builder.append("Diffset {");
final StringList list = new StringList();
for (final Diff diff : diffs)
{
list.add(newLine + diff.toDiffViewFriendlyString());
}
builder.append(list.join(newLine));
builder.append(newLine + "]");
builder.append(newLine + "}");
return builder.toString();
}

Expand Down Expand Up @@ -350,14 +350,15 @@ public String toDiffViewFriendlyString()
{
final String newLine = System.getProperty("line.separator");
final StringBuilder builder = new StringBuilder();
builder.append("[Diff: ");
builder.append(this.diffType);
builder.append("Diff {");
builder.append(newLine);
builder.append("Entity = ");
builder.append(this.itemType);
builder.append("diffType: " + this.diffType);
builder.append(newLine);
builder.append("ID = ");
builder.append(this.identifier);
builder.append("diffReason: " + this.diffReason);
builder.append(newLine);
builder.append("Entity = " + this.itemType);
builder.append(newLine);
builder.append("ID = " + this.identifier);
builder.append(newLine);
if (this.getBaseEntity() != null)
{
Expand All @@ -379,7 +380,7 @@ public String toDiffViewFriendlyString()
builder.append("null");
}
builder.append(newLine);
builder.append("]");
builder.append("}");
return builder.toString();
}

Expand Down

0 comments on commit c3d93b9

Please sign in to comment.