Exemplo n.º 1
0
        public void CanFetchAnIndexEntryByItsName()
        {
            using (var repo = new Repository(StandardTestRepoPath))
            {
                IndexEntry entry = repo.Index["README"];
                entry.Path.ShouldEqual("README");

                // Expressed in Posix format...
                IndexEntry entryWithPath = repo.Index["1/branch_file.txt"];
                entryWithPath.Path.ShouldEqual(subBranchFile);

                //...or in native format
                IndexEntry entryWithPath2 = repo.Index[subBranchFile];
                entryWithPath2.ShouldEqual(entryWithPath);
            }
        }