Examples of TestRepository


Examples of org.eclipse.egit.core.test.TestRepository

  @Before
  public void setUp() throws Exception {
    super.setUp();
    gitDir = new File(project.getProject()
        .getLocationURI().getPath(), Constants.DOT_GIT);
    testRepository = new TestRepository(gitDir);
    testRepository.connect(project.getProject());
  }
View Full Code Here

Examples of org.eclipse.jgit.junit.TestRepository

    }
  }

  @Test
  public void testTinyThinPack() throws Exception {
    TestRepository d = new TestRepository<Repository>(db);
    RevBlob a = d.blob("a");

    TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(1024);

    packHeader(pack, 1);
View Full Code Here

Examples of org.eclipse.jgit.junit.TestRepository

    p.parse(NullProgressMonitor.INSTANCE);
  }

  @Test
  public void testPackWithTrailingGarbage() throws Exception {
    TestRepository d = new TestRepository<Repository>(db);
    RevBlob a = d.blob("a");

    TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(1024);
    packHeader(pack, 1);
    pack.write((Constants.OBJ_REF_DELTA) << 4 | 4);
    a.copyRawTo(pack);
View Full Code Here

Examples of org.eclipse.jgit.junit.TestRepository

    }
  }

  @Test
  public void testMaxObjectSizeFullBlob() throws Exception {
    TestRepository d = new TestRepository<Repository>(db);
    final byte[] data = Constants.encode("0123456789");
    d.blob(data);

    TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(1024);

    packHeader(pack, 1);
    pack.write((Constants.OBJ_BLOB) << 4 | 10);
View Full Code Here

Examples of org.eclipse.jgit.junit.TestRepository

    }
  }

  @Test
  public void testMaxObjectSizeDeltaBlock() throws Exception {
    TestRepository d = new TestRepository<Repository>(db);
    RevBlob a = d.blob("a");

    TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(1024);

    packHeader(pack, 1);
    pack.write((Constants.OBJ_REF_DELTA) << 4 | 14);
View Full Code Here

Examples of org.eclipse.jgit.junit.TestRepository

    }
  }

  @Test
  public void testMaxObjectSizeDeltaResultSize() throws Exception {
    TestRepository d = new TestRepository<Repository>(db);
    RevBlob a = d.blob("0123456789");

    TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(1024);

    packHeader(pack, 1);
    pack.write((Constants.OBJ_REF_DELTA) << 4 | 4);
View Full Code Here

Examples of org.eclipse.jgit.junit.TestRepository

    }
  }

  @Test
  public void testNonMarkingInputStream() throws Exception {
    TestRepository d = new TestRepository<Repository>(db);
    RevBlob a = d.blob("a");

    TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(1024);
    packHeader(pack, 1);
    pack.write((Constants.OBJ_REF_DELTA) << 4 | 4);
    a.copyRawTo(pack);
View Full Code Here

Examples of org.eclipse.jgit.junit.TestRepository

    }
  }

  @Test
  public void testDataAfterPackFooterSingleRead() throws Exception {
    TestRepository d = new TestRepository<Repository>(db);
    RevBlob a = d.blob("a");

    TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(32*1024);
    packHeader(pack, 1);
    pack.write((Constants.OBJ_REF_DELTA) << 4 | 4);
    a.copyRawTo(pack);
View Full Code Here

Examples of org.eclipse.jgit.junit.TestRepository

    assertEquals(0x7e, in.read());
  }

  @Test
  public void testDataAfterPackFooterSplitHeaderRead() throws Exception {
    TestRepository d = new TestRepository<Repository>(db);
    final byte[] data = Constants.encode("a");
    RevBlob b = d.blob(data);

    int objects = 248;
    TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(32 * 1024);
    packHeader(pack, objects + 1);
    int offset = 13;
View Full Code Here

Examples of org.eclipse.jgit.junit.TestRepository

        HDR_CONTENT_TYPE));
  }

  @Test
  public void testPushNotSupported() throws Exception {
    final TestRepository src = createTestRepository();
    final RevCommit Q = src.commit().create();
    final Repository db = src.getRepository();

    Transport t = Transport.open(db, remoteURI);
    ((TransportHttp) t).setUseSmartHttp(false);
    try {
      try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.