]> source.dussan.org Git - jgit.git/commit
ObjectIdMatcher: Custom matcher for sets of ObjectIds 06/129806/6
authorIvan Frade <ifrade@google.com>
Fri, 21 Sep 2018 19:08:33 +0000 (12:08 -0700)
committerIvan Frade <ifrade@google.com>
Wed, 24 Oct 2018 21:54:23 +0000 (14:54 -0700)
commitd40835a8012fa185fb8e1703a77e26a3c4214fba
tree85fbf9435bc2105e72a6267674a7ef0d1be71112
parenta579a56e3ae2e5ab6b3287c4450fe6c59ebc85e7
ObjectIdMatcher: Custom matcher for sets of ObjectIds

Parsed requests represent object ids (SHA1) in ObjectId instances but tests
use strings for those ids because they are easier to define.

Create a custom matcher that hides the conversion from string to
ObjectId. Note that this reverses the existing code conversion (it was
transforming ObjectIds into string).

This produces more readable code, consistent with the other hamcrest
assertions.

Change-Id: I47ba1d25557d791fe74fb93c740ff7de9923cc00
Signed-off-by: Ivan Frade <ifrade@google.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ObjectIdMatcher.java [new file with mode: 0644]
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ProtocolV2ParserTest.java