@Test public void showNotebookHistory() throws GitAPIException, IOException { // given notebookRepo = new GitNotebookRepo(conf); assertThat(notebookRepo.list()).isNotEmpty(); // when List<Rev> testNotebookHistory = notebookRepo.history(TEST_NOTE_ID); // then assertThat(testNotebookHistory).isNotEmpty(); }
@Test public void initNonemptyNotebookDir() throws IOException, GitAPIException { // given - .git does not exit File dotGit = new File(Joiner.on(File.separator).join(notebooksDir, ".git")); assertThat(dotGit.exists()).isEqualTo(false); // when notebookRepo = new GitNotebookRepo(conf); // then Git git = notebookRepo.getGit(); assertThat(git).isNotNull(); assertThat(dotGit.exists()).isEqualTo(true); assertThat(notebookRepo.list()).isNotEmpty(); List<DiffEntry> diff = git.diff().call(); assertThat(diff).isEmpty(); }