PageRenderTime 12ms CodeModel.GetById 2ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 1ms

/plugin-module-codegen-engine/src/test/java/com/atlassian/plugins/codegen/modules/common/GadgetTest.java

https://bitbucket.org/mmeinhold/amps
Java | 38 lines | 28 code | 7 blank | 3 comment | 0 complexity | 8c0b5eeb5b9f4084cd8f1c045f0527e3 MD5 | raw file
 1package com.atlassian.plugins.codegen.modules.common;
 2
 3import com.atlassian.plugins.codegen.AbstractModuleCreatorTestCase;
 4
 5import org.junit.Before;
 6import org.junit.Test;
 7
 8import static org.junit.Assert.assertEquals;
 9
10/**
11 * @since 3.6
12 */
13public class GadgetTest extends AbstractModuleCreatorTestCase<GadgetProperties>
14{
15    public GadgetTest()
16    {
17        super("gadget", new GadgetModuleCreator());
18    }
19    
20    @Before
21    public void setupProps() throws Exception
22    {
23        setProps(new GadgetProperties("My Gadget", "gadgets/mygadget/gadget.xml"));
24        props.setIncludeExamples(false);
25    }
26
27    @Test
28    public void gadgetFileIsGenerated() throws Exception
29    {
30        getResourceFile("gadgets/mygadget", "gadget.xml");
31    }
32
33    @Test
34    public void moduleHasLocation() throws Exception
35    {
36        assertEquals("gadgets/mygadget/gadget.xml", getGeneratedModule().attributeValue("location"));
37    }
38}