@@ -29,7 +29,7 @@ describe('Service caller', function() {
2929 const serviceCaller = dbWriter . serviceCaller ( serviceDeclaration , [ endpointDeclaration ] ) ;
3030 const params = { param1 :true , param2 : '1.2' , param3 : [ 1.2 , 3.4 ] , param4 :[ 5 , 6 ] } ;
3131
32- serviceCaller . call ( 'initializer' , params )
32+ serviceCaller . call ( endpointDeclaration . functionName , params )
3333 . then ( output => {
3434 expect ( output ) . to . eql ( true ) ;
3535 done ( ) ;
@@ -47,7 +47,7 @@ describe('Service caller', function() {
4747 const serviceCaller = dbWriter . serviceCaller ( serviceDeclaration , [ endpointDeclaration ] ) ;
4848 const params = { param1 :true , param2 : '1.2' , param3 : [ 1.2 , 3.4 ] , param4 :[ 5 , 6 ] } ;
4949
50- serviceCaller . call ( 'initializer' , params )
50+ serviceCaller . call ( endpointDeclaration . functionName , params )
5151 . then ( output => {
5252 expect ( output ) . to . eql ( true ) ;
5353 done ( ) ;
@@ -67,7 +67,7 @@ describe('Service caller', function() {
6767 const serviceCaller = dbWriter . serviceCaller ( serviceDeclaration , [ endpointDeclaration ] ) ;
6868 const params = { param1 :[ { "root" :{ "child" :"text1" } } , { "root" :{ "child" :"text2" } } ] } ;
6969
70- serviceCaller . call ( 'postOfMultipartForDocumentArray1' , params )
70+ serviceCaller . call ( endpointDeclaration . functionName , params )
7171 . then ( output => {
7272 expect ( output ) . to . eql ( [ "text1" , 1 ] ) ;
7373 done ( ) ;
@@ -87,7 +87,7 @@ describe('Service caller', function() {
8787 const serviceCaller = dbWriter . serviceCaller ( serviceDeclaration , [ endpointDeclaration ] ) ;
8888 const params = { param1 :[ 1.2 , 3.4 ] } ;
8989
90- serviceCaller . call ( 'postOfUrlencodedForDocumentArray1' , params )
90+ serviceCaller . call ( endpointDeclaration . functionName , params )
9191 . then ( output => {
9292 expect ( output ) . to . eql ( [ "text1" , 1 ] ) ;
9393 done ( ) ;
@@ -110,10 +110,10 @@ describe('Service caller', function() {
110110 const params1 = { param1 :[ 1.2 , 3.4 ] } ;
111111 const params2 = { param1 :[ { "root" :{ "child" :"text1" } } , { "root" :{ "child" :"text2" } } ] } ;
112112
113- serviceCaller . call ( 'postOfMultipartForDocumentArray1' , params1 )
113+ serviceCaller . call ( endpointDeclaration1 . functionName , params1 )
114114 . then ( output => {
115115 expect ( output ) . to . eql ( [ "text1" , 1 ] ) ;
116- return serviceCaller . call ( 'postOfMultipartForDocumentTextDocument1' , params2 ) ;
116+ return serviceCaller . call ( endpointDeclaration2 . functionName , params2 ) ;
117117 } )
118118 . then ( output => {
119119 expect ( output ) . to . eql ( 'abc' ) ;
0 commit comments