Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update test names
  • Loading branch information
seadowg committed Dec 1, 2025
commit 493711ec804abf8ed54d1150e297acc44e866516
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class FetchFormDetailsServerFormUseCasesTest {
}

@Test
fun whenFormDoesNotExist_isNotOnDevice() {
fun whenFormDoesNotExist_isNew() {
whenever(formSource.fetchFormList()).thenReturn(listOf(FORM_WITHOUT_MANIFEST))

val serverFormDetails = ServerFormUseCases.fetchFormDetails(formsRepository, formSource)
Expand All @@ -59,7 +59,7 @@ class FetchFormDetailsServerFormUseCasesTest {
}

@Test
fun whenAFormIsSoftDeleted_isNotOnDevice() {
fun whenAFormIsSoftDeleted_isNew() {
whenever(formSource.fetchFormList()).thenReturn(listOf(FORM_WITHOUT_MANIFEST))
formsRepository.save(
Form.Builder()
Expand All @@ -77,7 +77,7 @@ class FetchFormDetailsServerFormUseCasesTest {
}

@Test
fun whenAFormExists_andListContainsNewVersionWithDifferentHash_isUpdated() {
fun whenAFormExists_andListContainsNewVersionWithDifferentHash_isUpdatedVersion() {
whenever(formSource.fetchFormList()).thenReturn(listOf(FORM_WITHOUT_MANIFEST))
formsRepository.save(
Form.Builder()
Expand All @@ -93,7 +93,7 @@ class FetchFormDetailsServerFormUseCasesTest {
}

@Test
fun whenAFormExists_andListContainsSameVersionWithDifferentHash_isUpdated() {
fun whenAFormExists_andListContainsSameVersionWithDifferentHash_isUpdatedHash() {
whenever(formSource.fetchFormList()).thenReturn(listOf(FORM_WITHOUT_MANIFEST))
formsRepository.save(
Form.Builder()
Expand All @@ -110,7 +110,7 @@ class FetchFormDetailsServerFormUseCasesTest {
}

@Test
fun whenAFormExists_andHasNewMediaFileOnServer_isUpdated() {
fun whenAFormExists_andHasNewMediaFileOnServer_isUpdatedMedia() {
whenever(formSource.fetchFormList()).thenReturn(listOf(FORM_WITH_MANIFEST))
formsRepository.save(
Form.Builder()
Expand All @@ -128,7 +128,7 @@ class FetchFormDetailsServerFormUseCasesTest {
}

@Test
fun whenAFormExists_andHasUpdatedMediaFileOnServer_isUpdated() {
fun whenAFormExists_andHasUpdatedMediaFileOnServer_isUpdatedMedia() {
whenever(formSource.fetchFormList()).thenReturn(listOf(FORM_WITH_MANIFEST))

val mediaDir = TempFiles.createTempDir()
Expand All @@ -150,7 +150,7 @@ class FetchFormDetailsServerFormUseCasesTest {
}

@Test
fun whenAFormExists_andItsNewerVersionWithUpdatedMediaFilesHasBeenAlreadyDownloaded_isNotNewOrUpdated() {
fun whenAFormExists_andItsNewerVersionWithUpdatedMediaFilesHasBeenAlreadyDownloaded_isOnDevice() {
whenever(formSource.fetchFormList()).thenReturn(listOf(FORM_WITH_MANIFEST))

val mediaDir1 = TempFiles.createTempDir()
Expand Down Expand Up @@ -248,7 +248,7 @@ class FetchFormDetailsServerFormUseCasesTest {
}

@Test
fun whenAFormExists_andIsNotUpdatedOnServer_andDoesNotHaveAManifest_isNotNewOrUpdated() {
fun whenAFormExists_andIsNotUpdatedOnServer_andDoesNotHaveAManifest_isOnDevice() {
whenever(formSource.fetchFormList()).thenReturn(listOf(FORM_WITHOUT_MANIFEST))

formsRepository.save(
Expand All @@ -266,7 +266,7 @@ class FetchFormDetailsServerFormUseCasesTest {
}

@Test
fun whenFormExists_andMediaFilesExist_isNotNewOrUpdated() {
fun whenFormExists_andMediaFilesExist_isOnDevice() {
whenever(formSource.fetchFormList()).thenReturn(listOf(FORM_WITH_MANIFEST))

val mediaDir = TempFiles.createTempDir()
Expand All @@ -288,7 +288,7 @@ class FetchFormDetailsServerFormUseCasesTest {
}

@Test
fun whenAFormExists_andIsUpdatedOnServer_andDoesNotHaveNewMedia_isUpdated() {
fun whenAFormExists_andIsUpdatedOnServer_andDoesNotHaveNewMedia_isUpdatedVersion() {
whenever(formSource.fetchFormList()).thenReturn(listOf(FORM_WITH_MANIFEST))

val mediaDir = TempFiles.createTempDir()
Expand All @@ -309,7 +309,7 @@ class FetchFormDetailsServerFormUseCasesTest {
}

@Test
fun whenAFormExists_andItsNewerVersionWithManifestIsAvailableButHasNullHash_isNotNewOrUpdated() {
fun whenAFormExists_andItsNewerVersionWithManifestIsAvailableButHasNullHash_isOnDevice() {
whenever(formSource.fetchFormList()).thenReturn(
listOf(FORM_WITH_MANIFEST.copy(hash = null))
)
Expand Down