1   package com.atlassian.sdk.accept;
2   
3   import static com.atlassian.sdk.accept.SdkHelper.runSdkScript;
4   
5   import java.io.File;
6   import java.io.IOException;
7   
8   public class TestCreateAndVerifyPlugin extends SdkTestBase
9   {
10      public void testJIRA() throws IOException, InterruptedException
11      {
12          createAndVerify("jira5");
13      }
14  
15      public void testRefapp() throws IOException, InterruptedException
16      {
17          createAndVerify("refapp");
18      }
19  
20      public void testStash() throws IOException, InterruptedException
21      {
22          createAndVerify("stash");
23      }
24  
25      public void testConfluence() throws IOException, InterruptedException
26      {
27          createAndVerify("confluence");
28      }
29  
30      public void testFeCru() throws IOException, InterruptedException
31      {
32          createAndVerify("fecru");
33      }
34  
35      public void testCrowd() throws IOException, InterruptedException
36      {
37          createAndVerify("crowd");
38      }
39  
40      public void testBamboo() throws IOException, InterruptedException
41      {
42          createAndVerify("bamboo");
43      }
44  
45  
46      private void createAndVerify(String productId)
47              throws IOException, InterruptedException
48      {
49          final String prefix = "create-and-verify";
50          File appDir = SdkHelper.createPlugin(productId, baseDir, sdkHome, prefix);
51  
52          runSdkScript(sdkHome, appDir, "atlas-integration-test");
53  
54          File pluginJar = new File(new File(appDir, "target"), prefix + "-" + productId + "-plugin-1.0-SNAPSHOT.jar");
55          assertTrue(pluginJar.exists());
56      }
57  }