Skip to content

Commit

Permalink
Improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccallum committed Jan 14, 2022
1 parent 239babe commit dc42942
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"QmFyCmkx",
null
],
"raw": "SomeId: 1, SomeIds: [1], SomeNullableId: 1, SomeNullableIds: [1, ]"
"raw": "SomeId: 1, SomeIds: [1], SomeNullableId: 1, SomeNullableIds: [1, null]"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,8 @@ public FooPayload(
public string Raw =>
$"{nameof(SomeId)}: {SomeId}, " +
$"{nameof(SomeIds)}: [{string.Join(", ", SomeIds)}], " +
$"{nameof(SomeNullableId)}: {SomeNullableId}, " +
$"{nameof(SomeNullableIds)}: [{string.Join(", ", SomeNullableIds ?? Array.Empty<int?>())}]";
$"{nameof(SomeNullableId)}: {SomeNullableId ?? "null"}, " +
$"{nameof(SomeNullableIds)}: {(SomeNullableIds == null ? "null" : "[" + string.Join(", ", SomeNullableIds.Select(x => x?.ToString() ?? "null").ToArray()) + "]")}";
}

public interface IFooPayload
Expand Down

0 comments on commit dc42942

Please sign in to comment.