google / ground-android

Ground mobile data collection app for Android
http://groundplatform.org
Apache License 2.0
245 stars 117 forks source link

[Code health] Remove "test" prefix from unit and instrumented test functions #1427

Open gino-m opened 1 year ago

gino-m commented 1 year ago

We currently do both - some tests are prefixed with test while others aren't.

For consistency, I suggest we are consistent with implicit convention in Android testing docs: https://developer.android.com/guide

@scolsen @shobhitagarwal1612 @JSunde Any objections?

JSunde commented 1 year ago

SGTM 👍

arun-kushwaha04 commented 1 year ago

Hey @gino-m , can i take this issue ?

gino-m commented 1 year ago

Sure, please go ahead!

devedroy commented 1 year ago

Hey @arun-kushwaha04 are you still working on this issue? If not, I would like to take up this issue. Thanks.

akansjain commented 1 year ago

Hey @gino-m , Is this issue available for me to take up?

SachinVermaDTU commented 1 year ago

is anybody working on this issue ?

gino-m commented 1 year ago

Not at the moment. For Kotlin tests I think we'd like to move towards descriptive test method names of the form:

@Test fun `getFoo() returns true when bar is empty`() { .. }

Or for Functional (SAM) interfaces:

@Test fun `Returns true when bar is empty`() { .. }

Would you be interested in taking this on? If so, I'd suggest starting with a PR updating a single test class. Thanks!

SachinVermaDTU commented 1 year ago

Thanks , i will be very happy to take this forward