ground-android icon indicating copy to clipboard operation
ground-android copied to clipboard

Added Unit Test for MapStateRepository

Open anandwana001 opened this issue 1 year ago • 2 comments

Fixes #2526

40% -> 58% Code Coverage

@sufyanAbbasi @shobhitagarwal1612 PTAL? Should we write test for the delegate property as well? I think the variables setter and getter are already tested and the remaining can be skip, but would like to know your thoughts on this.

Screenshot 2024-06-28 at 15 21 01

anandwana001 avatar Jun 28 '24 09:06 anandwana001

/gcbrun

shobhitagarwal1612 avatar Jun 28 '24 17:06 shobhitagarwal1612

Should we write test for the delegate property as well? I think the variables setter and getter are already tested and the remaining can be skip

I think your analysis is correct here, we don't need to unit test those since they are Kotlin features we can assume to just work.

Thank you so much!

sufyanAbbasi avatar Jul 02 '24 19:07 sufyanAbbasi

/gcbrun

shobhitagarwal1612 avatar Jul 05 '24 10:07 shobhitagarwal1612

@anandwana001 Can you please ensure that the checks are passing locally as well?

* What went wrong:
Execution failed for task ':workspace:ground:ktfmtCheckTest'.
> [ktfmt] Found 1 files that are not properly formatted:
  src/test/java/com/google/android/ground/repository/MapStateRepositoryTest.kt

shobhitagarwal1612 avatar Jul 13 '24 07:07 shobhitagarwal1612

/gcbrun

sufyanAbbasi avatar Jul 19 '24 08:07 sufyanAbbasi

/gcbrun

sufyanAbbasi avatar Jul 19 '24 09:07 sufyanAbbasi

Passing locally, running again now

anandwana001 avatar Jul 19 '24 09:07 anandwana001

/gcbrun

anandwana001 avatar Jul 19 '24 09:07 anandwana001