@@ -41,7 +41,7 @@ class ArtifactQualifiedNameTest {
4141
4242 ArtifactQualifiedName (
4343 identifier = " C:/test/main.js:executeDemos()" ,
44- type = METHOD
44+ type = FUNCTION
4545 ).let {
4646 val fileParent = it.asParent()
4747 assertNotNull(fileParent)
@@ -58,15 +58,15 @@ class ArtifactQualifiedNameTest {
5858 identifier = " C:/test/main.js:executeDemos()#SlNDYWxsRXhwcmVzc2lvbg==" ,
5959 type = EXPRESSION
6060 ).let {
61- val methodParent = it.asParent()
62- assertNotNull(methodParent )
61+ val functionParent = it.asParent()
62+ assertNotNull(functionParent )
6363 assertEquals(
6464 " C:/test/main.js:executeDemos()" ,
65- methodParent !! .identifier
65+ functionParent !! .identifier
6666 )
67- assertEquals(methodParent .type, METHOD )
67+ assertEquals(functionParent .type, FUNCTION )
6868
69- val fileParent = methodParent .asParent()
69+ val fileParent = functionParent .asParent()
7070 assertNotNull(fileParent)
7171 assertEquals(
7272 " C:/test/main.js" ,
@@ -79,17 +79,17 @@ class ArtifactQualifiedNameTest {
7979
8080 ArtifactQualifiedName (
8181 identifier = " C:/test/main.js:TestClass.executeDemos()" ,
82- type = METHOD
82+ type = FUNCTION
8383 ).let {
84- val methodParent = it.asParent()
85- assertNotNull(methodParent )
84+ val functionParent = it.asParent()
85+ assertNotNull(functionParent )
8686 assertEquals(
8787 " C:/test/main.js:TestClass" ,
88- methodParent !! .identifier
88+ functionParent !! .identifier
8989 )
90- assertEquals(methodParent .type, CLASS )
90+ assertEquals(functionParent .type, CLASS )
9191
92- val classParent = methodParent .asParent()
92+ val classParent = functionParent .asParent()
9393 assertNotNull(classParent)
9494 assertEquals(
9595 " C:/test/main.js" ,
@@ -110,17 +110,17 @@ class ArtifactQualifiedNameTest {
110110 " C:/test/main.js:TestClass.executeDemos()" ,
111111 expressionParent!! .identifier
112112 )
113- assertEquals(expressionParent.type, METHOD )
113+ assertEquals(expressionParent.type, FUNCTION )
114114
115- val methodParent = expressionParent.asParent()
116- assertNotNull(methodParent )
115+ val functionParent = expressionParent.asParent()
116+ assertNotNull(functionParent )
117117 assertEquals(
118118 " C:/test/main.js:TestClass" ,
119- methodParent !! .identifier
119+ functionParent !! .identifier
120120 )
121- assertEquals(methodParent .type, CLASS )
121+ assertEquals(functionParent .type, CLASS )
122122
123- val classParent = methodParent .asParent()
123+ val classParent = functionParent .asParent()
124124 assertNotNull(classParent)
125125 assertEquals(
126126 " C:/test/main.js" ,
@@ -134,13 +134,13 @@ class ArtifactQualifiedNameTest {
134134
135135 @Test
136136 fun `test parent qualified name` () {
137- val methodExpression = ArtifactQualifiedName (" com.example.TestClass.fun()#22" , type = EXPRESSION )
138- val method = methodExpression .asParent()
139- assertNotNull(method )
140- assertEquals(" com.example.TestClass.fun()" , method !! .identifier)
141- assertEquals(METHOD , method .type)
137+ val functionExpression = ArtifactQualifiedName (" com.example.TestClass.fun()#22" , type = EXPRESSION )
138+ val function = functionExpression .asParent()
139+ assertNotNull(function )
140+ assertEquals(" com.example.TestClass.fun()" , function !! .identifier)
141+ assertEquals(FUNCTION , function .type)
142142
143- val clazz = method .asParent()
143+ val clazz = function .asParent()
144144 assertNotNull(clazz)
145145 assertEquals(" com.example.TestClass" , clazz!! .identifier)
146146 assertEquals(CLASS , clazz.type)
@@ -154,16 +154,16 @@ class ArtifactQualifiedNameTest {
154154
155155 @Test
156156 fun `test parent qualified name with args` () {
157- val methodExpression = ArtifactQualifiedName (
157+ val functionExpression = ArtifactQualifiedName (
158158 " com.example.TestClass.fun(java.lang.String)#22" ,
159159 type = EXPRESSION
160160 )
161- val method = methodExpression .asParent()
162- assertNotNull(method )
163- assertEquals(" com.example.TestClass.fun(java.lang.String)" , method !! .identifier)
164- assertEquals(METHOD , method .type)
161+ val function = functionExpression .asParent()
162+ assertNotNull(function )
163+ assertEquals(" com.example.TestClass.fun(java.lang.String)" , function !! .identifier)
164+ assertEquals(FUNCTION , function .type)
165165
166- val clazz = method .asParent()
166+ val clazz = function .asParent()
167167 assertNotNull(clazz)
168168 assertEquals(" com.example.TestClass" , clazz!! .identifier)
169169 assertEquals(CLASS , clazz.type)
@@ -172,37 +172,37 @@ class ArtifactQualifiedNameTest {
172172 @Test
173173 fun `test is child of` () {
174174 val clazz = ArtifactQualifiedName (" com.example.TestClass" , type = CLASS )
175- val method = ArtifactQualifiedName (" com.example.TestClass.fun()" , type = METHOD )
176- val methodExpression = ArtifactQualifiedName (" com.example.TestClass.fun()#22" , type = EXPRESSION )
175+ val function = ArtifactQualifiedName (" com.example.TestClass.fun()" , type = FUNCTION )
176+ val functionExpression = ArtifactQualifiedName (" com.example.TestClass.fun()#22" , type = EXPRESSION )
177177
178- assertTrue(methodExpression .isChildOf(clazz))
179- assertTrue(methodExpression .isChildOf(method ))
180- assertFalse(methodExpression .isChildOf(methodExpression ))
178+ assertTrue(functionExpression .isChildOf(clazz))
179+ assertTrue(functionExpression .isChildOf(function ))
180+ assertFalse(functionExpression .isChildOf(functionExpression ))
181181
182- assertTrue(method .isChildOf(clazz))
183- assertFalse(method .isChildOf(method ))
182+ assertTrue(function .isChildOf(clazz))
183+ assertFalse(function .isChildOf(function ))
184184
185185 assertFalse(clazz.isChildOf(clazz))
186- assertFalse(clazz.isChildOf(method ))
187- assertFalse(method .isChildOf(methodExpression ))
186+ assertFalse(clazz.isChildOf(function ))
187+ assertFalse(function .isChildOf(functionExpression ))
188188 }
189189
190190 @Test
191191 fun `test is parent of` () {
192192 val clazz = ArtifactQualifiedName (" com.example.TestClass" , type = CLASS )
193- val method = ArtifactQualifiedName (" com.example.TestClass.fun()" , type = METHOD )
194- val methodExpression = ArtifactQualifiedName (" com.example.TestClass.fun()#22" , type = EXPRESSION )
193+ val function = ArtifactQualifiedName (" com.example.TestClass.fun()" , type = FUNCTION )
194+ val functionExpression = ArtifactQualifiedName (" com.example.TestClass.fun()#22" , type = EXPRESSION )
195195
196- assertTrue(clazz.isParentOf(methodExpression ))
197- assertTrue(method .isParentOf(methodExpression ))
198- assertFalse(methodExpression .isParentOf(methodExpression ))
196+ assertTrue(clazz.isParentOf(functionExpression ))
197+ assertTrue(function .isParentOf(functionExpression ))
198+ assertFalse(functionExpression .isParentOf(functionExpression ))
199199
200- assertTrue(clazz.isParentOf(method ))
201- assertFalse(method .isParentOf(method ))
200+ assertTrue(clazz.isParentOf(function ))
201+ assertFalse(function .isParentOf(function ))
202202
203203 assertFalse(clazz.isParentOf(clazz))
204- assertFalse(method .isParentOf(clazz))
205- assertFalse(methodExpression .isParentOf(method ))
204+ assertFalse(function .isParentOf(clazz))
205+ assertFalse(functionExpression .isParentOf(function ))
206206 }
207207
208208 @Test
@@ -212,8 +212,8 @@ class ArtifactQualifiedNameTest {
212212 assertNotNull(clazz)
213213 assertEquals(" com.example.TestClass" , clazz!! .identifier)
214214
215- val method = ArtifactQualifiedName (" com.example.TestClass.fun()" , type = METHOD )
216- val clazz2 = method .toClass()
215+ val function = ArtifactQualifiedName (" com.example.TestClass.fun()" , type = FUNCTION )
216+ val clazz2 = function .toClass()
217217 assertNotNull(clazz2)
218218 assertEquals(" com.example.TestClass" , clazz2!! .identifier)
219219 }
@@ -225,8 +225,8 @@ class ArtifactQualifiedNameTest {
225225 assertNotNull(clazz)
226226 assertEquals(" com.example.TestClass\$ InnerClass" , clazz!! .identifier)
227227
228- val method = ArtifactQualifiedName (" com.example.TestClass\$ InnerClass.fun()" , type = METHOD )
229- val clazz2 = method .toClass()
228+ val function = ArtifactQualifiedName (" com.example.TestClass\$ InnerClass.fun()" , type = FUNCTION )
229+ val clazz2 = function .toClass()
230230 assertNotNull(clazz2)
231231 assertEquals(" com.example.TestClass\$ InnerClass" , clazz2!! .identifier)
232232 }
0 commit comments