@@ -2,7 +2,7 @@ import { expect } from "chai";
22import * as stubber from "../../../support/stubber" ;
33import { prepareMethods } from "../../../../objectApi/methodFormat" ;
44import { Ui5ObjectMethod , LibraryApiSymbol } from "../../../../core/types" ;
5- import { ui5ObjectApi } from "./common" ;
5+ import { ColumnListItemApiSymbol } from ". ./common" ;
66
77const rawMethod : Ui5ObjectMethod = {
88 description : "This is <code>method</code>" ,
@@ -51,7 +51,7 @@ describe("methodFormat tests", () => {
5151 } ) ;
5252
5353 it ( "should prepare basic fields" , ( ) => {
54- const formatted = prepareMethods ( [ rawMethod ] , ui5ObjectApi , true , true ) ;
54+ const formatted = prepareMethods ( [ rawMethod ] , ColumnListItemApiSymbol , true , true ) ;
5555 expect ( formatted ) . to . have . lengthOf ( 1 ) ;
5656 const method = formatted [ 0 ] ;
5757 expect ( method . description ) . to . equal ( "This is method" ) ;
@@ -63,33 +63,38 @@ describe("methodFormat tests", () => {
6363 } ) ;
6464
6565 it ( "should prepare deprecated" , ( ) => {
66- const formatted = prepareMethods ( [ rawMethodDeprecated ] , ui5ObjectApi , true , true ) ;
66+ const formatted = prepareMethods ( [ rawMethodDeprecated ] , ColumnListItemApiSymbol , true , true ) ;
6767 expect ( formatted ) . to . have . lengthOf ( 1 ) ;
6868 expect ( formatted [ 0 ] . description ) . to . equal ( "[DEPRECATED! No longer used] This is method" ) ;
6969 } ) ;
7070
7171 it ( "should prepare flat static name" , ( ) => {
72- const formatted = prepareMethods ( [ rawMethodStatic ] , ui5ObjectApi , true , true ) ;
72+ const formatted = prepareMethods ( [ rawMethodStatic ] , ColumnListItemApiSymbol , true , true ) ;
7373 expect ( formatted ) . to . have . lengthOf ( 1 ) ;
7474 expect ( formatted [ 0 ] . static ) . to . be . true ;
7575 expect ( formatted [ 0 ] . name ) . to . equal ( "myMethod" ) ;
7676 } ) ;
7777
7878 it ( "should prepare full static name" , ( ) => {
79- const formatted = prepareMethods ( [ rawMethodStatic ] , ui5ObjectApi , true , false ) ;
79+ const formatted = prepareMethods ( [ rawMethodStatic ] , ColumnListItemApiSymbol , true , false ) ;
8080 expect ( formatted ) . to . have . lengthOf ( 1 ) ;
8181 expect ( formatted [ 0 ] . static ) . to . be . true ;
8282 expect ( formatted [ 0 ] . name ) . to . equal ( "sap.m.ColumnListItem.myMethod" ) ;
8383 } ) ;
8484
8585 it ( "should prepare with params" , ( ) => {
86- const formatted = prepareMethods ( [ rawMethodWithParams ] , ui5ObjectApi , true , true ) ;
86+ const formatted = prepareMethods ( [ rawMethodWithParams ] , ColumnListItemApiSymbol , true , true ) ;
8787 expect ( formatted ) . to . have . lengthOf ( 1 ) ;
8888 expect ( formatted [ 0 ] . parameters ) . to . have . lengthOf ( 1 ) ;
8989 } ) ;
9090
9191 it ( "should prepare with simple return value" , ( ) => {
92- const formatted = prepareMethods ( [ rawMethodWithSimpleReturnType ] , ui5ObjectApi , true , true ) ;
92+ const formatted = prepareMethods (
93+ [ rawMethodWithSimpleReturnType ] ,
94+ ColumnListItemApiSymbol ,
95+ true ,
96+ true
97+ ) ;
9398 expect ( formatted ) . to . have . lengthOf ( 1 ) ;
9499 const method = formatted [ 0 ] ;
95100 expect ( method . hasReturnValue ) . to . be . true ;
@@ -98,7 +103,12 @@ describe("methodFormat tests", () => {
98103 } ) ;
99104
100105 it ( "should prepare with UI5 object return value" , ( ) => {
101- const formatted = prepareMethods ( [ rawMethodWithUi5ReturnType ] , ui5ObjectApi , true , true ) ;
106+ const formatted = prepareMethods (
107+ [ rawMethodWithUi5ReturnType ] ,
108+ ColumnListItemApiSymbol ,
109+ true ,
110+ true
111+ ) ;
102112 expect ( formatted ) . to . have . lengthOf ( 1 ) ;
103113 const method = formatted [ 0 ] ;
104114 expect ( method . hasReturnValue ) . to . be . true ;
0 commit comments