Total rebrand across KMM project: - Kotlin package: com.example.casera -> com.tt.honeyDue (dirs + declarations) - Gradle: rootProject.name, namespace, applicationId - Android: manifest, strings.xml (all languages), widget resources - iOS: pbxproj bundle IDs, Info.plist, entitlements, xcconfig - iOS directories: Casera/ -> HoneyDue/, CaseraTests/ -> HoneyDueTests/, etc. - Swift source: all class/struct/enum renames - Deep links: casera:// -> honeydue://, .casera -> .honeydue - App icons replaced with honeyDue honeycomb icon - Domains: casera.treytartt.com -> honeyDue.treytartt.com - Bundle IDs: com.tt.casera -> com.tt.honeyDue - Database table names preserved Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
116 lines
3.2 KiB
Swift
116 lines
3.2 KiB
Swift
//
|
|
// DocumentHelpersTests.swift
|
|
// honeyDueTests
|
|
//
|
|
// Unit tests for DocumentTypeHelper and DocumentCategoryHelper.
|
|
//
|
|
|
|
import Testing
|
|
@testable import honeyDue
|
|
|
|
// MARK: - DocumentTypeHelper Tests
|
|
|
|
struct DocumentTypeHelperTests {
|
|
|
|
@Test func warrantyDisplayName() {
|
|
#expect(DocumentTypeHelper.displayName(for: "warranty") == "Warranty")
|
|
}
|
|
|
|
@Test func manualDisplayName() {
|
|
#expect(DocumentTypeHelper.displayName(for: "manual") == "User Manual")
|
|
}
|
|
|
|
@Test func receiptDisplayName() {
|
|
#expect(DocumentTypeHelper.displayName(for: "receipt") == "Receipt/Invoice")
|
|
}
|
|
|
|
@Test func inspectionDisplayName() {
|
|
#expect(DocumentTypeHelper.displayName(for: "inspection") == "Inspection Report")
|
|
}
|
|
|
|
@Test func insuranceDisplayName() {
|
|
#expect(DocumentTypeHelper.displayName(for: "insurance") == "Insurance")
|
|
}
|
|
|
|
@Test func permitDisplayName() {
|
|
#expect(DocumentTypeHelper.displayName(for: "permit") == "Permit")
|
|
}
|
|
|
|
@Test func deedDisplayName() {
|
|
#expect(DocumentTypeHelper.displayName(for: "deed") == "Deed/Title")
|
|
}
|
|
|
|
@Test func contractDisplayName() {
|
|
#expect(DocumentTypeHelper.displayName(for: "contract") == "Contract")
|
|
}
|
|
|
|
@Test func photoDisplayName() {
|
|
#expect(DocumentTypeHelper.displayName(for: "photo") == "Photo")
|
|
}
|
|
|
|
@Test func unknownTypeDefaultsToOther() {
|
|
#expect(DocumentTypeHelper.displayName(for: "unknown") == "Other")
|
|
}
|
|
|
|
@Test func emptyTypeDefaultsToOther() {
|
|
#expect(DocumentTypeHelper.displayName(for: "") == "Other")
|
|
}
|
|
|
|
@Test func allTypesArrayNotEmpty() {
|
|
#expect(!DocumentTypeHelper.allTypes.isEmpty)
|
|
}
|
|
|
|
@Test func allTypesContainsWarranty() {
|
|
#expect(DocumentTypeHelper.allTypes.contains("warranty"))
|
|
}
|
|
}
|
|
|
|
// MARK: - DocumentCategoryHelper Tests
|
|
|
|
struct DocumentCategoryHelperTests {
|
|
|
|
@Test func applianceDisplayName() {
|
|
#expect(DocumentCategoryHelper.displayName(for: "appliance") == "Appliance")
|
|
}
|
|
|
|
@Test func hvacDisplayName() {
|
|
#expect(DocumentCategoryHelper.displayName(for: "hvac") == "HVAC")
|
|
}
|
|
|
|
@Test func plumbingDisplayName() {
|
|
#expect(DocumentCategoryHelper.displayName(for: "plumbing") == "Plumbing")
|
|
}
|
|
|
|
@Test func electricalDisplayName() {
|
|
#expect(DocumentCategoryHelper.displayName(for: "electrical") == "Electrical")
|
|
}
|
|
|
|
@Test func roofingDisplayName() {
|
|
#expect(DocumentCategoryHelper.displayName(for: "roofing") == "Roofing")
|
|
}
|
|
|
|
@Test func structuralDisplayName() {
|
|
#expect(DocumentCategoryHelper.displayName(for: "structural") == "Structural")
|
|
}
|
|
|
|
@Test func landscapingDisplayName() {
|
|
#expect(DocumentCategoryHelper.displayName(for: "landscaping") == "Landscaping")
|
|
}
|
|
|
|
@Test func generalDisplayName() {
|
|
#expect(DocumentCategoryHelper.displayName(for: "general") == "General")
|
|
}
|
|
|
|
@Test func unknownCategoryDefaultsToOther() {
|
|
#expect(DocumentCategoryHelper.displayName(for: "xyz") == "Other")
|
|
}
|
|
|
|
@Test func allCategoriesArrayNotEmpty() {
|
|
#expect(!DocumentCategoryHelper.allCategories.isEmpty)
|
|
}
|
|
|
|
@Test func allCategoriesContainsHVAC() {
|
|
#expect(DocumentCategoryHelper.allCategories.contains("hvac"))
|
|
}
|
|
}
|