Search in sources :

Example 1 with ModifiedFilesCacheKey

use of com.google.gerrit.server.patch.diff.ModifiedFilesCacheKey in project gerrit by GerritCodeReview.

the class ModifiedFilesCacheKeySerializerTest method roundTrip.

@Test
public void roundTrip() {
    ModifiedFilesCacheKey key = ModifiedFilesCacheKey.builder().project(Project.NameKey.parse("Project/X")).aCommit(COMMIT_ID_1).bCommit(COMMIT_ID_2).renameScore(65).build();
    byte[] serialized = ModifiedFilesCacheKey.Serializer.INSTANCE.serialize(key);
    assertThat(ModifiedFilesCacheKey.Serializer.INSTANCE.deserialize(serialized)).isEqualTo(key);
}
Also used : ModifiedFilesCacheKey(com.google.gerrit.server.patch.diff.ModifiedFilesCacheKey) Test(org.junit.Test)

Aggregations

ModifiedFilesCacheKey (com.google.gerrit.server.patch.diff.ModifiedFilesCacheKey)1 Test (org.junit.Test)1