Example #1
0
  @Test
  public void testGitIgnoreCreate() throws Exception {
    executeGitIgnoreCreate();

    GitIgnoreResource gitignore = gitIgnoreResource();
    assertTrue(gitignore.exists());
    String content = Streams.toString(gitignore.getResourceInputStream());
    assertTrue(content.contains(".settings/"));
  }
Example #2
0
  @Test
  public void testGitIgnoreAddPattern() throws Exception {
    executeGitIgnoreCreate();

    CommandController gitIgnoreAddPatternTester =
        testHarness.createCommandController(GitIgnoreAddPatternCommand.class, project.getRoot());
    gitIgnoreAddPatternTester.initialize();
    gitIgnoreAddPatternTester.setValueFor("pattern", "*.forge");
    gitIgnoreAddPatternTester.execute();

    GitIgnoreResource gitignore = gitIgnoreResource();
    String content = Streams.toString(gitignore.getResourceInputStream());
    assertTrue(content.contains("*.forge"));
  }