scala - Can't find a private method exception, while testing a private method -


i trying write unit test case private method in scala using mockitosugar throwing can't find private method exception. here code.

      object activityrepo{          private def addactivity(activity:activity):future[activity]={               //doing db calls           }       } 

unit test:

      "activity repo test" must {          "add activity" in {           // doing mock db calls            val addactivity = privatemethod[future[activity]]('addactivity)            val result = activityrepo invokeprivate addactivity (activity)           // doing assertions                }       } 

where mistake?


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -