Images-to-PDF icon indicating copy to clipboard operation
Images-to-PDF copied to clipboard

Add unit tests for "getRealPathFromURI_API19"

Open Swati4star opened this issue 5 years ago • 5 comments

Add unit tests for getRealPathFromURI_API19 API - https://github.com/Swati4star/Images-to-PDF/blob/7b04d1b482a3a9534d6f3cc91209bb743a662d8a/app/src/main/java/swati4star/createpdf/util/RealPathUtil.java#L34 with atleast 95% code coverage

Swati4star avatar Oct 16 '19 06:10 Swati4star

Hi @Swati4star, can I take this?

lucianofecampos avatar Oct 20 '19 20:10 lucianofecampos

@lucianofecampos Sure. Go ahead 👍

Swati4star avatar Oct 21 '19 05:10 Swati4star

Any updates @lucianofecampos ?

Swati4star avatar Oct 28 '19 16:10 Swati4star

Sorry. I couldn't do it yet, but this week I will work on that.

lucianofecampos avatar Oct 28 '19 20:10 lucianofecampos

Hello @Swati4star i would like to contribute with this issue if you wouldn't mind but i am not versed in so mush in Unit Testing so i have set my objective and i would your opinion to be assure if i am on the right track this is how i would to write my test

@Test
  private fun testGetRealPathFromURI_API19(){

      //given
      var uri: Uri
      //---> with a valid path
      //---> with a unValid path
      //---> with a null

      //when
      // assign uri with null
      // assign uri with a valid path

      //then
//      assure    to return null when assigned with null
//      assure   to return null when assigned with unValid path
//      assure   to return path in string  when assigned with a valid path
  }

thank you .....

ddopik avatar Jun 16 '20 23:06 ddopik