コード例 #1
0
ファイル: GitIgnoreCommandsTest.java プロジェクト: forge/core
  @Test
  public void testGitIgnoreCreate() throws Exception {
    executeGitIgnoreCreate();

    GitIgnoreResource gitignore = gitIgnoreResource();
    assertTrue(gitignore.exists());
    String content = Streams.toString(gitignore.getResourceInputStream());
    assertTrue(content.contains(".settings/"));
  }
コード例 #2
0
ファイル: GitIgnoreCommandsTest.java プロジェクト: forge/core
  @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"));
  }