public void TestCsharplangReadIndex() { string repoDir = TestUtils.ExtractZippedRepo("csharplang.git"); PackIndexReader reader = new PackIndexReader(repoDir); long packFileOffset = reader.ReadIndex("pack-dae4b1886286da035b337f24ab5b707ad18d8a3c", "411106b0108a37789ed3d53fd781acf8f75ef97b"); Assert.AreEqual(744249, packFileOffset); }
public void TestCsharplangReadIndexLast() { //This test ensures the edge case of getting the offset for the last hash in the index works. string repoDir = TestUtils.ExtractZippedRepo("csharplang.git"); PackIndexReader reader = new PackIndexReader(repoDir); long packFileOffset = reader.ReadIndex("pack-dae4b1886286da035b337f24ab5b707ad18d8a3c", "FFE711AA1535AF6FF434CBBCC50E1D3B1B9FDA82"); Assert.AreEqual(300872, packFileOffset); }