Esempio n. 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/"));
  }
Esempio n. 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"));
  }