@cparra/apex-reflection 2.0.2 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__tests__/end-to-end.test.ts +25 -0
- package/coverage/clover.xml +16078 -0
- package/coverage/coverage-final.json +3 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +79 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +126 -0
- package/coverage/lcov-report/index.js.html +104 -0
- package/coverage/lcov-report/out.js.html +51275 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +170 -0
- package/coverage/lcov.info +30738 -0
- package/index.d.ts +7 -0
- package/index.ts +7 -0
- package/out.js +5215 -5168
- package/package.json +1 -1
|
@@ -294,4 +294,29 @@ describe('Class reflection', () => {
|
|
|
294
294
|
expect(result.classes[0].name).toBe('MyClass');
|
|
295
295
|
expect(result.classes[0].methods.length).toBe(2);
|
|
296
296
|
});
|
|
297
|
+
|
|
298
|
+
test('Can have members in groups', () => {
|
|
299
|
+
const classBody = `
|
|
300
|
+
public with sharing class MyClass {
|
|
301
|
+
/**
|
|
302
|
+
* @start-group Group Name
|
|
303
|
+
* @description Group Description
|
|
304
|
+
*/
|
|
305
|
+
public String Prop1 { get; set; }
|
|
306
|
+
public Integer Prop2 { get; set; }
|
|
307
|
+
/** @end-group */
|
|
308
|
+
}
|
|
309
|
+
`;
|
|
310
|
+
|
|
311
|
+
const result = (reflect(classBody)).typeMirror as ClassMirror;
|
|
312
|
+
expect(result.properties.length).toBe(2);
|
|
313
|
+
expect(result.properties[0].typeReference.type).toBe('String');
|
|
314
|
+
expect(result.properties[0].name).toBe('Prop1');
|
|
315
|
+
expect(result.properties[0].group).toBe('Group Name');
|
|
316
|
+
expect(result.properties[0].groupDescription).toBe('Group Description');
|
|
317
|
+
expect(result.properties[1].typeReference.type).toBe('Integer');
|
|
318
|
+
expect(result.properties[1].name).toBe('Prop2');
|
|
319
|
+
expect(result.properties[1].group).toBe('Group Name');
|
|
320
|
+
expect(result.properties[1].groupDescription).toBe('Group Description');
|
|
321
|
+
});
|
|
297
322
|
});
|