Skip to content

Instantly share code, notes, and snippets.

@keesun
Created May 21, 2013 07:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keesun/5618004 to your computer and use it in GitHub Desktop.
Save keesun/5618004 to your computer and use it in GitHub Desktop.
@Test
public void buildCloneRepository() throws GitAPIException, IOException {
// Given
Project original = createProject("keesun", "test");
CloneAndFetchTemplate template = createTemplate(original);
new GitRepository("keesun", "test").create();
// When
Repository repository = template.buildCloneRepository();
// Then
assertThat(repository).isNotNull();
assertThat(template.getDirectory()).isNotNull();
String clonePath = "resources/test/repo/git-merging/keesun/test.git";
assertThat(template.getDirectory()).isEqualTo(clonePath);
assertThat(new File(clonePath).exists()).isTrue();
assertThat(new File(clonePath + "/.git").exists()).isTrue();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment