Rename GitPersonSubject#creationDate to date

The subject method name should match the field name.

Plus, there is no clear "creation date" for a git identity: it sounds
like it refers to the date the PersonIdent instance was created, rather
than the date _stored in_the PersonIdent. But that is never something we
care about.

It could also be associated with with the "creation date" of a commit,
but that would also be ambiguous: it could refer either to the original
iteration of the commit (the author timestamp), or the current commit
object's creation date (the commit timestamp).

Let's just stick with "date".

Change-Id: I40d80558aeb8cb5cbad754f081e76fff616ad878
This commit is contained in:
Dave Borowitz
2017-11-13 09:52:54 -05:00
parent 1033e51129
commit e22eb48f66
2 changed files with 3 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ public class GitPersonSubject extends Subject<GitPersonSubject, GitPerson> {
super(failureMetadata, gitPerson);
}
public ComparableSubject<?, Timestamp> creationDate() {
public ComparableSubject<?, Timestamp> date() {
isNotNull();
GitPerson gitPerson = actual();
return Truth.assertThat(gitPerson.date).named("creationDate");

View File

@@ -263,7 +263,7 @@ public class ChangeEditIT extends AbstractDaemonTest {
ensureSameBytes(getFileContentOfEdit(changeId2, FILE_NAME2), CONTENT_NEW2);
Optional<EditInfo> rebasedEdit = getEdit(changeId2);
assertThat(rebasedEdit).value().baseRevision().isEqualTo(currentPatchSet.getRevision().get());
assertThat(rebasedEdit).value().commit().committer().creationDate().isNotEqualTo(beforeRebase);
assertThat(rebasedEdit).value().commit().committer().date().isNotEqualTo(beforeRebase);
}
@Test
@@ -282,7 +282,7 @@ public class ChangeEditIT extends AbstractDaemonTest {
ensureSameBytes(getFileContentOfEdit(changeId2, FILE_NAME2), CONTENT_NEW2);
Optional<EditInfo> rebasedEdit = getEdit(changeId2);
assertThat(rebasedEdit).value().baseRevision().isEqualTo(currentPatchSet.getRevision().get());
assertThat(rebasedEdit).value().commit().committer().creationDate().isNotEqualTo(beforeRebase);
assertThat(rebasedEdit).value().commit().committer().date().isNotEqualTo(beforeRebase);
}
@Test