View Javadoc
1   package it.allproducts;
2   
3   import com.atlassian.plugin.spring.scanner.annotation.export.ModuleType;
4   import com.atlassian.plugin.spring.scanner.test.servlet.CallCustomModuleTypeServlet;
5   import it.perproduct.AbstractInProductTest;
6   import org.junit.Test;
7   
8   import static org.junit.Assert.assertEquals;
9   
10  /**
11   * Integration test for the use of {@link ModuleType}.
12   */
13  public class TestCustomModuleType extends AbstractInProductTest {
14      /**
15       * @see CallCustomModuleTypeServlet
16       */
17      private static final String CALL_CUSTOM_MODULE_URL = BASEURL + "/plugins/servlet/call-custom-module-type";
18  
19      /**
20       * Test that the {@code <basic/>} element in atlassian-plugin.xml has created an instance of
21       * {@link com.atlassian.plugin.spring.scanner.test.moduletype.BasicModuleDescriptor}.
22       */
23      @Test
24      public void testCustomModuleTypeIsInstalled() throws Exception {
25          assertEquals("Basic module is working", getUrl(CALL_CUSTOM_MODULE_URL));
26      }
27  }