|
17 | 17 | */
|
18 | 18 | package org.ballerinalang.test.record;
|
19 | 19 |
|
20 |
| -import io.ballerina.runtime.api.types.Type; |
21 |
| -import io.ballerina.runtime.api.types.TypeTags; |
| 20 | +import io.ballerina.runtime.api.TypeTags; |
22 | 21 | import io.ballerina.runtime.api.utils.StringUtils;
|
23 |
| -import io.ballerina.runtime.api.utils.TypeUtils; |
24 | 22 | import io.ballerina.runtime.api.values.BArray;
|
25 | 23 | import io.ballerina.runtime.api.values.BMap;
|
26 | 24 | import org.ballerinalang.test.BAssertUtil;
|
@@ -138,14 +136,12 @@ public void testOptionalNonDefField4() {
|
138 | 136 | BArray returns = (BArray) BRunUtil.invoke(compileResult, "testOptionalNonDefField4");
|
139 | 137 | Assert.assertEquals(returns.get(0).toString(),
|
140 | 138 | "{\"street\":\"Palm Grove\",\"city\":\"Colombo 3\",\"country\":\"LK\"}");
|
141 |
| - Type type = TypeUtils.getReferredType(getType(returns.get(0))); |
142 |
| - Assert.assertEquals(type.getTag(), TypeTags.RECORD_TYPE_TAG); |
143 |
| - Assert.assertEquals(type.getName(), "Address3"); |
| 139 | + Assert.assertEquals(getType(returns.get(0)).getTag(), TypeTags.RECORD_TYPE_TAG); |
| 140 | + Assert.assertEquals(getType(returns.get(0)).getName(), "Address3"); |
144 | 141 | Assert.assertEquals(returns.get(1).toString(),
|
145 | 142 | "{\"street\":\"Palm Grove\",\"city\":\"Colombo 3\",\"country\":\"LK\"}");
|
146 |
| - type = TypeUtils.getReferredType(getType(returns.get(1))); |
147 |
| - Assert.assertEquals(type.getTag(), TypeTags.RECORD_TYPE_TAG); |
148 |
| - Assert.assertEquals(type.getName(), "Address3"); |
| 143 | + Assert.assertEquals(getType(returns.get(1)).getTag(), TypeTags.RECORD_TYPE_TAG); |
| 144 | + Assert.assertEquals(getType(returns.get(1)).getName(), "Address3"); |
149 | 145 | }
|
150 | 146 |
|
151 | 147 | @Test(description = "Test defaultable user defined type as an optional field")
|
|
0 commit comments