// Path: javagit/src/test/java/edu/nyu/cs/javagit/TestBase.java
// @Ignore
// public class TestBase extends TestCase {
// 
//     @Before
//     public void setUp() throws IOException, JavaGitException {
//         JavaGitConfiguration.setGitPath(TestProperty.GIT_PATH.asString());
//     }
// }


import edu.nyu.cs.javagit.TestBase;
import org.junit.Test;
import java.io.File;
    public void testWorkingTreeDotGitEquality() {
        WorkingTree workingTree = WorkingTree.getInstance(TEST_DIRNAME);

        // Check that the <code>WorkingTree</code> path matches its <code>Git</code> path
        assertEquals(workingTree.getPath(), workingTree.getDotGit().getPath());

        // Also test equality not through <code>WorkingTree</code> but using getInstance
        assertEquals(workingTree.getDotGit(), DotGit.getInstance(TEST_DIRNAME));

        // Also check that things are equal a layer deeper
        assertEquals(workingTree, workingTree.getDotGit().getWorkingTree());
    }

    @Test
    public void testWorkingTreeGetFile() throws JavaGitException {
        WorkingTree workingTree = WorkingTree.getInstance(TEST_DIRNAME);
        File file = new File("file1");

        GitFile gitFile = workingTree.getFile(file);
        assertEquals(gitFile.getWorkingTree(), workingTree);

        GitDirectory gitDirectory = workingTree.getDirectory(file);
        assertEquals(gitDirectory.getWorkingTree(), workingTree);
    }

    private static void runEqualityTests(String path1, String path2, boolean accessViaFileObjects,
                                         boolean testEquality) {
        WorkingTree workingTree1, workingTree2;

        if (accessViaFileObjects) {
// Path: javagit/src/test/java/edu/nyu/cs/javagit/TestBase.java
// @Ignore
// public class TestBase extends TestCase {
// 
//     @Before
//     public void setUp() throws IOException, JavaGitException {
//         JavaGitConfiguration.setGitPath(TestProperty.GIT_PATH.asString());
//     }
// }


// Path: javagit/src/test/java/edu/nyu/cs/javagit/api/TestWorkingTree.java
import edu.nyu.cs.javagit.TestBase;
import org.junit.Test;
import java.io.File;

    public void testWorkingTreeDotGitEquality() {
        WorkingTree workingTree = WorkingTree.getInstance(TEST_DIRNAME);

        // Check that the <code>WorkingTree</code> path matches its <code>Git</code> path
        assertEquals(workingTree.getPath(), workingTree.getDotGit().getPath());

        // Also test equality not through <code>WorkingTree</code> but using getInstance
        assertEquals(workingTree.getDotGit(), DotGit.getInstance(TEST_DIRNAME));

        // Also check that things are equal a layer deeper
        assertEquals(workingTree, workingTree.getDotGit().getWorkingTree());
    }

    @Test
    public void testWorkingTreeGetFile() throws JavaGitException {
        WorkingTree workingTree = WorkingTree.getInstance(TEST_DIRNAME);
        File file = new File("file1");

        GitFile gitFile = workingTree.getFile(file);
        assertEquals(gitFile.getWorkingTree(), workingTree);

        GitDirectory gitDirectory = workingTree.getDirectory(file);
        assertEquals(gitDirectory.getWorkingTree(), workingTree);
    }

    private static void runEqualityTests(String path1, String path2, boolean accessViaFileObjects,
                                         boolean testEquality) {
        WorkingTree workingTree1, workingTree2;

        if (accessViaFileObjects) {
            workingTree1 = WorkingTree.getInstance(new File(path1));