Swati4star / Images-to-PDF

An app to convert images to PDF file!
GNU General Public License v3.0
1.21k stars 811 forks source link

Add unit tests for "getRealPathFromURI_API19" #824

Open Swati4star opened 5 years ago

Swati4star commented 5 years ago

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

lucianofecampos commented 5 years ago

Hi @Swati4star, can I take this?

Swati4star commented 5 years ago

@lucianofecampos Sure. Go ahead 👍

Swati4star commented 5 years ago

Any updates @lucianofecampos ?

lucianofecampos commented 5 years ago

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

ddopik commented 4 years ago

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 .....

Chengyue-Fei commented 2 weeks ago

Hi, just wondering if this issue still opens and can I work on it?