package com.chrisfolger.needsmoredojo.core.util;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class TestAMDUtil
{
    @Test
    public void dojoModuleWithHyphenConvertedCorrectly()
    {
        assertEquals("domConstruct", AMDUtil.defineToParameter("dojo/dom-construct"));
    }

    @Test
    public void testModuleWithUnderscore()
    {
        assertEquals("WidgetBase", AMDUtil.defineToParameter("dijit/_WidgetBase"));
    }

    @Test
    public void testBasicModule()
    {
        assertEquals("BorderContainer", AMDUtil.defineToParameter("dijit/layout/BorderContainer"));
    }
}

@@ -612,11 +612,192 @@
 );%0A    %7D
+%0A%0A    // TODO this fails at the moment%0A    @Test%0A    public void testTextPlugin()%0A    %7B%0A        assertEquals(%22AModule%22, AMDUtil.defineToParameter(%22dojo/text!./amodule.html%22));%0A    %7D
 %0A%7D%0A

add a failing test to come back to for importing templates