import Testing
@testable import SoliCards

@Suite("Card Model Tests")
struct CardTests {

    @Test("Card color matches suit")
    func cardColor() {
        let redCard = Card(suit: .hearts, rank: .ace)
        let blackCard = Card(suit: .spades, rank: .king)

        #expect(redCard.color == .red)
        #expect(blackCard.color == .black)
    }

    @Test("Card accessibility description")
    func accessibilityDescription() {
        let faceUp = Card(suit: .diamonds, rank: .queen, isFaceUp: true)
        let faceDown = Card(suit: .clubs, rank: .two, isFaceUp: false)

        #expect(faceUp.accessibilityDescription == "Queen of Diamonds")
        #expect(faceDown.accessibilityDescription == "Card, face down")
    }

    @Test("Card identity")
    func uniqueIdentity() {
        let card1 = Card(suit: .spades, rank: .ace)
        let card2 = Card(suit: .spades, rank: .ace)

        // Same suit/rank but different IDs
        #expect(card1.id != card2.id)
    }

    @Test("Front image name")
    func frontImageName() {
        let card = Card(suit: .hearts, rank: .king)
        #expect(card.frontImageName(style: .classic) == "classic_hearts_king")
        #expect(card.frontImageName(style: .modern) == "modern_hearts_king")
    }
}
