package com.syncflow.ui.addpair

import com.syncflow.domain.model.DeleteBehavior
import com.syncflow.domain.model.SyncDirection
import org.junit.Assert.assertEquals
import org.junit.Test

/**
 * The Add-Pair screen's default deletion behaviour must never wipe a backup. One-way directions
 * default to KEEP so deleting a file on the phone leaves the cloud copy intact; two-way defaults
 * to MIRROR. (The user can still override to any of the three options.)
 */
class RecommendedDeleteBehaviorTest {

    @Test fun `upload-only defaults to KEEP so backups are never deleted`() =
        assertEquals(DeleteBehavior.KEEP, recommendedDeleteBehavior(SyncDirection.UPLOAD_ONLY))

    @Test fun `download-only defaults to KEEP`() =
        assertEquals(DeleteBehavior.KEEP, recommendedDeleteBehavior(SyncDirection.DOWNLOAD_ONLY))

    @Test fun `two-way defaults to MIRROR`() =
        assertEquals(DeleteBehavior.MIRROR, recommendedDeleteBehavior(SyncDirection.TWO_WAY))
}
