<NME> ElmResolveLinkTest.kt
<BEF> ADDFILE
<MSG> Add clickable links to generated documentation (#55)

Added docs support for:
- type aliases
- function parameters
- module declarations

Union members are now included in the docs for a union type.

Added hyperlinks for all types shown in the docs
<DFF> @@ -0,0 +1,37 @@
+package org.elm.ide.docs
+
+import com.intellij.psi.PsiManager
+import org.elm.lang.ElmTestBase
+import org.elm.lang.core.psi.ElmNamedElement
+import org.intellij.lang.annotations.Language
+
+class ElmResolveLinkTest : ElmTestBase(){
+    fun `test type`() = doTest(
+"""
+type Foo = Bar
+   --X
+
+foo : Foo
+foo = 0
+--^
+""", "Foo")
+
+    fun `test type alias`() = doTest(
+            """
+type alias Foo = Int
+         --X
+
+foo : Foo
+foo = 0
+--^
+""", "Foo")
+
+    private fun doTest(@Language("Elm") code: String, link: String) {
+        InlineFile(code)
+        val context = findElementInEditor<ElmNamedElement>("^")
+        val expectedElement = findElementInEditor<ElmNamedElement>("X")
+        val actualElement = ElmDocumentationProvider()
+                .getDocumentationElementForLink(PsiManager.getInstance(project), link, context)
+        assertEquals(expectedElement, actualElement)
+    }
+}

Add clickable links to generated documentation (#55)