Package org.eclipse.jgit.storage.file

Examples of org.eclipse.jgit.storage.file.FileRepository


      }

    };
    new CommitFinder(testRepo).setFilter(filter).find();
    assertEquals(2, ids.size());
    Collection<Edit> diffs = BlobUtils.diff(new FileRepository(testRepo),
        ids.get(0).toObjectId(), ids.get(1).toObjectId());
    assertNotNull(diffs);
    assertEquals(1, diffs.size());
    assertNotNull(diffs.toArray()[0]);
  }
View Full Code Here


   *
   * @throws IOException
   */
  @Test
  public void diffWithZeroObjectIds() throws IOException {
    Collection<Edit> edits = BlobUtils.diff(new FileRepository(testRepo),
        ObjectId.zeroId(), ObjectId.zeroId());
    assertNotNull(edits);
    assertTrue(edits.isEmpty());
  }
View Full Code Here

      }

    };
    new CommitFinder(testRepo).setFilter(filter).find();
    assertEquals(1, ids.size());
    Collection<Edit> diffs = BlobUtils.diff(new FileRepository(testRepo),
        ids.get(0).toObjectId(), ObjectId.zeroId());
    assertNotNull(diffs);
    assertEquals(1, diffs.size());
    assertEquals(Type.DELETE, diffs.iterator().next().getType());
  }
View Full Code Here

      }

    };
    new CommitFinder(testRepo).setFilter(filter).find();
    assertEquals(1, ids.size());
    Collection<Edit> diffs = BlobUtils.diff(new FileRepository(testRepo),
        ids.get(0).toObjectId(), ObjectId.zeroId());
    assertNotNull(diffs);
    assertTrue(diffs.isEmpty());
  }
View Full Code Here

      }

    };
    new CommitFinder(testRepo).setFilter(filter).find();
    assertEquals(1, ids.size());
    Collection<Edit> diffs = BlobUtils.diff(new FileRepository(testRepo),
        ObjectId.zeroId(), ids.get(0).toObjectId());
    assertNotNull(diffs);
    assertTrue(diffs.isEmpty());
  }
View Full Code Here

   *
   * @throws IOException
   */
  @Test(expected = IllegalArgumentException.class)
  public void diffWithNullObjectId1() throws IOException {
    BlobUtils.diff(new FileRepository(testRepo), null, ObjectId.zeroId());
  }
View Full Code Here

   *
   * @throws IOException
   */
  @Test(expected = IllegalArgumentException.class)
  public void diffWithNullObjectId2() throws IOException {
    BlobUtils.diff(new FileRepository(testRepo), ObjectId.zeroId(), null);
  }
View Full Code Here

   *
   * @throws IOException
   */
  @Test(expected = IllegalArgumentException.class)
  public void diffWithNullComparator() throws IOException {
    BlobUtils.diff(new FileRepository(testRepo), ObjectId.zeroId(),
        ObjectId.zeroId(), null);
  }
View Full Code Here

   *
   * @throws IOException
   */
  @Test(expected = IllegalArgumentException.class)
  public void getRawContentNullCommitId() throws IOException {
    BlobUtils.getRawContent(new FileRepository(testRepo), (ObjectId) null,
        "test.txt");
  }
View Full Code Here

   *
   * @throws IOException
   */
  @Test(expected = IllegalArgumentException.class)
  public void getRawContentNullRevision() throws IOException {
    BlobUtils.getRawContent(new FileRepository(testRepo), (String) null,
        "test.txt");
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.storage.file.FileRepository

Copyright © 2018 www.massapicom. 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.