@Test void backwardCompatibility() throws Exception { final CreateRepositoryCommand c = (CreateRepositoryCommand) Jackson.readValue( '{' + " \"type\": \"CREATE_REPOSITORY\"," + " \"projectName\": \"foo\"," + " \"repositoryName\": \"bar\"" + '}', Command.class); assertThat(c.author()).isEqualTo(Author.SYSTEM); assertThat(c.timestamp()).isNotZero(); assertThat(c.projectName()).isEqualTo("foo"); assertThat(c.repositoryName()).isEqualTo("bar"); }
@JsonProperty public String repositoryName() { return repositoryName; }
CreateRepositoryCommand extends ProjectCommand<Void> { @JsonProperty public String repositoryName() { return repositoryName; } }
CreateRepositoryCommand extends ProjectCommand<Void> { @JsonProperty public String repositoryName() { return repositoryName; } @JsonCreator  CreateRepositoryCommand(@JsonProperty("timestamp") @Nullable Long timestamp,
                            @JsonProperty("author") @Nullable Author author,
                            @JsonProperty("projectName") String projectName,
                            @JsonProperty("repositoryName") String repositoryName); }
CreateRepositoryCommand extends ProjectCommand<Void> { @JsonProperty public String repositoryName() { return repositoryName; } @JsonCreator  CreateRepositoryCommand(@JsonProperty("timestamp") @Nullable Long timestamp,
                            @JsonProperty("author") @Nullable Author author,
                            @JsonProperty("projectName") String projectName,
                            @JsonProperty("repositoryName") String repositoryName); @JsonProperty String repositoryName(); @Override boolean equals(Object obj); @Override int hashCode(); }
CreateRepositoryCommand extends ProjectCommand<Void> { @JsonProperty public String repositoryName() { return repositoryName; } @JsonCreator  CreateRepositoryCommand(@JsonProperty("timestamp") @Nullable Long timestamp,
                            @JsonProperty("author") @Nullable Author author,
                            @JsonProperty("projectName") String projectName,
                            @JsonProperty("repositoryName") String repositoryName); @JsonProperty String repositoryName(); @Override boolean equals(Object obj); @Override int hashCode();  }