package com.chrisfolger.needsmoredojo.core.amd.psi;

import com.chrisfolger.needsmoredojo.testutil.BasicPsiElements;
import com.chrisfolger.needsmoredojo.testutil.MockJSElementInterface;
import com.chrisfolger.needsmoredojo.testutil.MockJSLiteralExpression;
import com.chrisfolger.needsmoredojo.testutil.MockPsiComment;
import com.intellij.psi.tree.IElementType;
import org.junit.Test;

public class TestAMDPsiUtil
{
    @Test
    public void foo()
    {
        new MockPsiComment("foo");

        BasicPsiElements.createChain(new MockJSElementInterface[]{
                new MockJSLiteralExpression("dijit/layout/ContentPane"),

                BasicPsiElements.comma()});
    }
}

@@ -46,16 +46,94 @@
 d.psi;%0A%0A
+import com.chrisfolger.needsmoredojo.core.amd.importing.UnusedImportsRemover;%0A
 import c
@@ -391,16 +391,52 @@
 omment;%0A
+import com.intellij.psi.PsiElement;%0A
 import c
@@ -491,90 +491,457 @@
 nit.
-Test;%0A%0Apublic class TestAMDPsiUtil%0A%7B%0A    @Test%0A    public void foo()%0A    %7B%0A       
+Before;%0Aimport org.junit.Test;%0A%0Aimport java.util.HashSet;%0Aimport java.util.Set;%0A%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertTrue;%0A%0Apublic class TestAMDPsiUtil%0A%7B%0A    private Set%3CPsiElement%3E removeList;%0A%0A    @Before%0A    public void setup()%0A    %7B%0A        removeList = new HashSet%3CPsiElement%3E();%0A    %7D%0A%0A    @Test%0A    public void deleteDefineLiteral_normalCommentIsNotRemoved()%0A    %7B%0A        MockPsiComment comment =
  new
@@ -961,198 +961,939 @@
 nt(%22
+/*
 foo
-%22);%0A%0A        BasicPsiElements.createChain(new MockJSElementInterface%5B%5D%7B%0A                new MockJSLiteralExpression(%22dijit/layout/ContentPane%22),%0A%0A                BasicPsiElements.comma()%7D
+*/%22);%0A        MockJSLiteralExpression literal = new MockJSLiteralExpression(%22dijit/layout/ContentPane%22);%0A%0A        BasicPsiElements.createChain(new MockJSElementInterface%5B%5D%7B%0A                literal,%0A                comment,%0A                BasicPsiElements.comma()%7D);%0A%0A        AMDPsiUtil.removeDefineLiteral(literal, removeList);%0A%0A        assertFalse(removeList.contains(comment));%0A    %7D%0A%0A    @Test%0A    public void deleteDefineLiteral_ignoreCommentIsRemoved()%0A    %7B%0A        MockPsiComment comment = new MockPsiComment(UnusedImportsRemover.IGNORE_COMMENT);%0A        MockJSLiteralExpression literal = new MockJSLiteralExpression(%22dijit/layout/ContentPane%22);%0A%0A        BasicPsiElements.createChain(new MockJSElementInterface%5B%5D%7B%0A                literal,%0A                comment,%0A                BasicPsiElements.comma()%7D);%0A%0A        AMDPsiUtil.removeDefineLiteral(literal, removeList);%0A%0A        assertTrue(removeList.contains(comment)
 );%0A 

add test cases to confirm new behavior