1   package com.atlassian.sdk.accept;
2   
3   import static com.atlassian.sdk.accept.SdkHelper.runSdkScript;
4   
5   import java.io.IOException;
6   import java.io.File;
7   
8   public class TestClover extends SdkTestBase
9   {
10  
11      public void testConfluence() throws IOException, InterruptedException
12      {
13          createAndRunClover("confluence");
14      }
15  
16      private void createAndRunClover(String productId)
17              throws IOException, InterruptedException
18      {
19          final String prefix = "create-and-run-clover";
20          File appDir = SdkHelper.createPlugin(productId, baseDir, sdkHome, prefix);
21  
22          runSdkScript(sdkHome, appDir, "atlas-clover");
23  
24          File pluginJar = new File(new File(appDir, "target"), prefix + "-" + productId + "-plugin-1.0-SNAPSHOT.jar");
25          assertTrue(pluginJar.exists());
26  
27          final File cloverDir = SdkHelper.file(appDir, "target", "site", "clover");
28          final File cloverHtmlReport = SdkHelper.file(cloverDir, "index.html");
29          final File cloverXmlReport = SdkHelper.file(cloverDir,  "clover.xml");
30          assertTrue(cloverHtmlReport.exists());
31          assertTrue(cloverXmlReport.exists());
32  
33      }
34  
35  }