mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 00:47:11 +02:00
Clarify diff display of MutatingCommand
Tools inheriting from MutatingCommand print out the change they are going to make and then ask the user to confirm that this is indeed what they wanted to do. The change is outputted as a list of updated values in the form key -> [oldValue, newValue] e.g. dnsPaused -> [true, false] This CL will change the output to be clearer: key: oldValue -> newValue e.g. dnsPaused: true -> false ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=170853745
This commit is contained in:
parent
fd62f4a74e
commit
01591ff88e
8 changed files with 30 additions and 31 deletions
|
@ -68,8 +68,8 @@ public class DiffUtilsTest {
|
|||
Map<String, Object> mapB = new HashMap<String, Object>();
|
||||
mapB.put("a", "tim");
|
||||
mapB.put("b", ImmutableSet.of());
|
||||
// This ensures that it is not outputting a diff of [b -> [null, []].
|
||||
assertThat(prettyPrintEntityDeepDiff(mapA, mapB)).isEqualTo("a -> [jim, tim]\n");
|
||||
// This ensures that it is not outputting a diff of b: null -> [].
|
||||
assertThat(prettyPrintEntityDeepDiff(mapA, mapB)).isEqualTo("a: jim -> tim\n");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue