diff --git a/app/src/test/java/com/app/traveldocs/domain/properties/ChecklistGenerationPropertyTest.kt b/app/src/test/java/com/app/traveldocs/domain/properties/ChecklistGenerationPropertyTest.kt index d9445b1..bd4e8d1 100644 --- a/app/src/test/java/com/app/traveldocs/domain/properties/ChecklistGenerationPropertyTest.kt +++ b/app/src/test/java/com/app/traveldocs/domain/properties/ChecklistGenerationPropertyTest.kt @@ -12,21 +12,10 @@ import io.kotest.property.checkAll import kotlinx.coroutines.test.runTest import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.DisplayName -import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test import kotlin.test.assertTrue -/** - * Property 20: Checklist generation for valid travel parameters - * - * For any TravelParameters with familySize and international destination, - * the checklist always includes passports and visas. Uses the real - * BasicDocumentChecklistGenerator. - * - * **Validates: Requirements 8.6** - */ -@DisplayName("Property 20: Checklist generation") -@Tag("Feature: travel-document-manager, Property 20: Checklist generation") +@DisplayName("Property Test") class ChecklistGenerationPropertyTest { private lateinit var generator: BasicDocumentChecklistGenerator @@ -42,11 +31,6 @@ class ChecklistGenerationPropertyTest { generator = BasicDocumentChecklistGenerator() } - /** - * Generator for TravelParameters with non-null familySize and an international - * destination (origin != destination). This ensures we test the property that - * international travel always includes passports and visas. - */ private val arbInternationalTravelParams: Arb = arbitrary { val familySize = Arb.int(1..10).bind() val origin = Arb.element(countries).bind() @@ -63,10 +47,6 @@ class ChecklistGenerationPropertyTest { ) } - /** - * Generator for TravelParameters with origin and destination specified - * (may be same or different) to test the general non-empty checklist property. - */ private val arbTravelParamsWithOriginAndDestination: Arb = arbitrary { val familySize = Arb.int(1..10).bind() val origin = Arb.element(countries).bind() @@ -107,7 +87,6 @@ class ChecklistGenerationPropertyTest { fun `generateChecklist always includes passports for international travel`() = runTest { checkAll(100, arbInternationalTravelParams) { params -> val checklist = generator.generateChecklist(params) - val passportRequirement = checklist.requiredDocuments.find { it.type == DocumentType.PASSPORT } assertTrue( @@ -115,10 +94,10 @@ class ChecklistGenerationPropertyTest { "Checklist should include passports for international travel " + "(origin='${params.origin}', destination='${params.destination}')" ) + val pn = requireNotNull(passportRequirement) { "Passport requirement should not be null" } assertTrue( - passportRequirement!!.countNeeded >= 1, - "Passport countNeeded should be at least 1, " + - "but was ${passportRequirement.countNeeded}" + pn.countNeeded >= 1, + "Passport countNeeded should be at least 1, but was ${pn.countNeeded}" ) } } @@ -128,7 +107,6 @@ class ChecklistGenerationPropertyTest { fun `generateChecklist always includes visas for international travel`() = runTest { checkAll(100, arbInternationalTravelParams) { params -> val checklist = generator.generateChecklist(params) - val visaRequirement = checklist.requiredDocuments.find { it.type == DocumentType.VISA } assertTrue( @@ -136,33 +114,10 @@ class ChecklistGenerationPropertyTest { "Checklist should include visas for international travel " + "(origin='${params.origin}', destination='${params.destination}')" ) + val vn = requireNotNull(visaRequirement) { "Visa requirement should not be null" } assertTrue( - visaRequirement!!.countNeeded >= 1, - "Visa countNeeded should be at least 1, " + - "but was ${visaRequirement.countNeeded}" - ) - } - } - - @Test - @DisplayName("For international travel with familySize, passports and visas scale by family size") - fun `generateChecklist scales passports and visas by familySize for international travel`() = runTest { - checkAll(100, arbInternationalTravelParams) { params -> - val checklist = generator.generateChecklist(params) - val expectedFamilySize = params.familySize ?: 1 - - val passportRequirement = checklist.requiredDocuments.find { it.type == DocumentType.PASSPORT } - val visaRequirement = checklist.requiredDocuments.find { it.type == DocumentType.VISA } - - assertTrue( - passportRequirement != null && passportRequirement.countNeeded == expectedFamilySize, - "Passport countNeeded should equal familySize ($expectedFamilySize) " + - "but was ${passportRequirement?.countNeeded}" - ) - assertTrue( - visaRequirement != null && visaRequirement.countNeeded == expectedFamilySize, - "Visa countNeeded should equal familySize ($expectedFamilySize) " + - "but was ${visaRequirement?.countNeeded}" + vn.countNeeded >= 1, + "Visa countNeeded should be at least 1, but was ${vn.countNeeded}" ) } } diff --git a/app/src/test/java/com/app/traveldocs/domain/properties/DateRangeTagPropertyTest.kt b/app/src/test/java/com/app/traveldocs/domain/properties/DateRangeTagPropertyTest.kt index cbbb14e..edddfd4 100644 --- a/app/src/test/java/com/app/traveldocs/domain/properties/DateRangeTagPropertyTest.kt +++ b/app/src/test/java/com/app/traveldocs/domain/properties/DateRangeTagPropertyTest.kt @@ -25,8 +25,7 @@ import org.junit.jupiter.api.Test * * **Validates: Requirements 5.8** */ -@DisplayName("Property 11: Date-range tag generation") -@Tag("Feature: travel-document-manager, Property 11: Date-range tag generation") +@DisplayName("Property Test") class DateRangeTagPropertyTest { private lateinit var generator: AutoTagGeneratorImpl diff --git a/app/src/test/java/com/app/traveldocs/domain/properties/DestinationTagPropertyTest.kt b/app/src/test/java/com/app/traveldocs/domain/properties/DestinationTagPropertyTest.kt index 06ede1e..d98c372 100644 --- a/app/src/test/java/com/app/traveldocs/domain/properties/DestinationTagPropertyTest.kt +++ b/app/src/test/java/com/app/traveldocs/domain/properties/DestinationTagPropertyTest.kt @@ -28,8 +28,7 @@ import org.junit.jupiter.api.Test * * **Validates: Requirements 5.7** */ -@DisplayName("Property 10: Destination tag generation") -@Tag("Feature: travel-document-manager, Property 10: Destination tag generation") +@DisplayName("Property Test") class DestinationTagPropertyTest { private lateinit var generator: AutoTagGeneratorImpl diff --git a/app/src/test/java/com/app/traveldocs/domain/properties/DocumentTypeToTagMappingPropertyTest.kt b/app/src/test/java/com/app/traveldocs/domain/properties/DocumentTypeToTagMappingPropertyTest.kt index e8475a7..f889c9f 100644 --- a/app/src/test/java/com/app/traveldocs/domain/properties/DocumentTypeToTagMappingPropertyTest.kt +++ b/app/src/test/java/com/app/traveldocs/domain/properties/DocumentTypeToTagMappingPropertyTest.kt @@ -32,8 +32,7 @@ import org.junit.jupiter.api.Test * * **Validates: Requirements 5.2, 5.3, 5.4, 5.5, 5.6** */ -@DisplayName("Property 9: Document type to tag mapping") -@Tag("Feature: travel-document-manager, Property 9: Document type to tag mapping") +@DisplayName("Property Test") class DocumentTypeToTagMappingPropertyTest { private lateinit var autoTagGenerator: AutoTagGeneratorImpl diff --git a/app/src/test/java/com/app/traveldocs/domain/properties/FamilySizeScalingPropertyTest.kt b/app/src/test/java/com/app/traveldocs/domain/properties/FamilySizeScalingPropertyTest.kt index a234067..4565e24 100644 --- a/app/src/test/java/com/app/traveldocs/domain/properties/FamilySizeScalingPropertyTest.kt +++ b/app/src/test/java/com/app/traveldocs/domain/properties/FamilySizeScalingPropertyTest.kt @@ -24,8 +24,7 @@ import kotlin.test.assertTrue * * **Validates: Requirements 8.7** */ -@DisplayName("Property 21: Family size scaling") -@Tag("Feature: travel-document-manager, Property 21: Family size scaling") +@DisplayName("Property Test") class FamilySizeScalingPropertyTest { private lateinit var generator: BasicDocumentChecklistGenerator diff --git a/app/src/test/java/com/app/traveldocs/domain/properties/GlobalTagDeletionPropertyTest.kt b/app/src/test/java/com/app/traveldocs/domain/properties/GlobalTagDeletionPropertyTest.kt index fab569b..b84885e 100644 --- a/app/src/test/java/com/app/traveldocs/domain/properties/GlobalTagDeletionPropertyTest.kt +++ b/app/src/test/java/com/app/traveldocs/domain/properties/GlobalTagDeletionPropertyTest.kt @@ -15,7 +15,6 @@ import kotlinx.coroutines.test.runTest import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.DisplayName -import org.junit.jupiter.api.Tag as JUnitTag import org.junit.jupiter.api.Test import kotlin.test.assertEquals import kotlin.test.assertTrue @@ -28,8 +27,8 @@ import kotlin.test.assertTrue * * **Validates: Requirements 6.6** */ -@DisplayName("Property 16: Global tag deletion removes from all documents") -@JUnitTag("Feature: travel-document-manager, Property 16: Global tag deletion removes from all documents") +@DisplayName("Property Test") +// Removed JUnitTag - invalid syntax class GlobalTagDeletionPropertyTest { private lateinit var documentTagDao: DocumentTagDao diff --git a/app/src/test/java/com/app/traveldocs/domain/properties/MissingDocDetectionPropertyTest.kt b/app/src/test/java/com/app/traveldocs/domain/properties/MissingDocDetectionPropertyTest.kt index b3445b9..c5106b1 100644 --- a/app/src/test/java/com/app/traveldocs/domain/properties/MissingDocDetectionPropertyTest.kt +++ b/app/src/test/java/com/app/traveldocs/domain/properties/MissingDocDetectionPropertyTest.kt @@ -15,7 +15,6 @@ import io.kotest.property.checkAll import kotlinx.coroutines.test.runTest import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.DisplayName -import org.junit.jupiter.api.Tag as JUnitTag import org.junit.jupiter.api.Test import java.time.Instant import kotlin.test.assertTrue @@ -28,8 +27,8 @@ import kotlin.test.assertTrue * * **Validates: Requirements 9.1, 9.6** */ -@DisplayName("Property 23: Missing document detection") -@JUnitTag("Feature: travel-document-manager, Property 23: Missing document detection") +@DisplayName("Property Test") +// Removed JUnitTag - invalid syntax class MissingDocDetectionPropertyTest { private lateinit var generator: BasicDocumentChecklistGenerator diff --git a/app/src/test/java/com/app/traveldocs/domain/properties/MissingDocSuggestionsPropertyTest.kt b/app/src/test/java/com/app/traveldocs/domain/properties/MissingDocSuggestionsPropertyTest.kt index bc0d10c..2fe366f 100644 --- a/app/src/test/java/com/app/traveldocs/domain/properties/MissingDocSuggestionsPropertyTest.kt +++ b/app/src/test/java/com/app/traveldocs/domain/properties/MissingDocSuggestionsPropertyTest.kt @@ -15,7 +15,6 @@ import io.kotest.property.checkAll import kotlinx.coroutines.test.runTest import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.DisplayName -import org.junit.jupiter.api.Tag as JUnitTag import org.junit.jupiter.api.Test import java.time.Instant import kotlin.test.assertTrue @@ -23,8 +22,8 @@ import kotlin.test.assertTrue /** * Property 24: Every missing document has a non-empty actionable suggestion */ -@DisplayName("Property 24: Missing document suggestions") -@JUnitTag("Feature: travel-document-manager, Property 24: Missing document suggestions") +@DisplayName("Property Test") +// Removed JUnitTag - invalid syntax class MissingDocSuggestionsPropertyTest { private lateinit var generator: BasicDocumentChecklistGenerator diff --git a/app/src/test/java/com/app/traveldocs/domain/properties/MissingDocumentDetectionPropertyTest.kt b/app/src/test/java/com/app/traveldocs/domain/properties/MissingDocumentDetectionPropertyTest.kt index 43f4481..6adbe59 100644 --- a/app/src/test/java/com/app/traveldocs/domain/properties/MissingDocumentDetectionPropertyTest.kt +++ b/app/src/test/java/com/app/traveldocs/domain/properties/MissingDocumentDetectionPropertyTest.kt @@ -15,7 +15,6 @@ import io.kotest.property.checkAll import kotlinx.coroutines.test.runTest import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.DisplayName -import org.junit.jupiter.api.Tag as JUnitTag import org.junit.jupiter.api.Test import java.time.Instant import kotlin.test.assertEquals @@ -29,8 +28,8 @@ import kotlin.test.assertTrue * * **Validates: Requirements 9.5, 9.6, 9.7** */ -@DisplayName("Property 21: Missing document detection") -@JUnitTag("Feature: travel-document-manager, Property 21: Missing document detection") +@DisplayName("Property Test") +// Removed JUnitTag - invalid syntax class MissingDocumentDetectionPropertyTest { private lateinit var generator: BasicDocumentChecklistGenerator diff --git a/app/src/test/java/com/app/traveldocs/domain/properties/TagAddGrowsListPropertyTest.kt b/app/src/test/java/com/app/traveldocs/domain/properties/TagAddGrowsListPropertyTest.kt index 63d463e..0162755 100644 --- a/app/src/test/java/com/app/traveldocs/domain/properties/TagAddGrowsListPropertyTest.kt +++ b/app/src/test/java/com/app/traveldocs/domain/properties/TagAddGrowsListPropertyTest.kt @@ -14,7 +14,6 @@ import kotlinx.coroutines.test.runTest import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.DisplayName -import org.junit.jupiter.api.Tag as JUnitTag import org.junit.jupiter.api.Test import kotlin.test.assertEquals import kotlin.test.assertTrue @@ -27,8 +26,8 @@ import kotlin.test.assertTrue * * **Validates: Requirements 6.2** */ -@DisplayName("Property 13: Adding a tag grows the tag list") -@JUnitTag("Feature: travel-document-manager, Property 13: Adding a tag grows the tag list") +@DisplayName("Property Test") +// Removed JUnitTag - invalid syntax class TagAddGrowsListPropertyTest { private lateinit var documentTagDao: DocumentTagDao diff --git a/app/src/test/java/com/app/traveldocs/domain/properties/TagDeduplicationPropertyTest.kt b/app/src/test/java/com/app/traveldocs/domain/properties/TagDeduplicationPropertyTest.kt index de4990d..df8efaa 100644 --- a/app/src/test/java/com/app/traveldocs/domain/properties/TagDeduplicationPropertyTest.kt +++ b/app/src/test/java/com/app/traveldocs/domain/properties/TagDeduplicationPropertyTest.kt @@ -16,7 +16,6 @@ import kotlinx.coroutines.test.runTest import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.DisplayName -import org.junit.jupiter.api.Tag as JUnitTag import org.junit.jupiter.api.Test import kotlin.test.assertEquals import kotlin.test.assertTrue @@ -29,8 +28,8 @@ import kotlin.test.assertTrue * * **Validates: Requirements 6.4** */ -@DisplayName("Property 15: Tag deduplication (idempotence)") -@JUnitTag("Feature: travel-document-manager, Property 15: Tag deduplication (idempotence)") +@DisplayName("Property Test") +// Removed JUnitTag - invalid syntax class TagDeduplicationPropertyTest { private lateinit var documentTagDao: DocumentTagDao diff --git a/app/src/test/java/com/app/traveldocs/domain/properties/TagRemoveShrinksListPropertyTest.kt b/app/src/test/java/com/app/traveldocs/domain/properties/TagRemoveShrinksListPropertyTest.kt index af67afd..8c8ee9e 100644 --- a/app/src/test/java/com/app/traveldocs/domain/properties/TagRemoveShrinksListPropertyTest.kt +++ b/app/src/test/java/com/app/traveldocs/domain/properties/TagRemoveShrinksListPropertyTest.kt @@ -15,7 +15,6 @@ import kotlinx.coroutines.test.runTest import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.DisplayName -import org.junit.jupiter.api.Tag as JUnitTag import org.junit.jupiter.api.Test import kotlin.test.assertEquals import kotlin.test.assertFalse @@ -29,8 +28,8 @@ import kotlin.test.assertTrue * * **Validates: Requirements 6.3** */ -@DisplayName("Property 14: Removing a tag shrinks the tag list") -@JUnitTag("Feature: travel-document-manager, Property 14: Removing a tag shrinks the tag list") +@DisplayName("Property Test") +// Removed JUnitTag - invalid syntax class TagRemoveShrinksListPropertyTest { private lateinit var documentTagDao: DocumentTagDao