package com.foxx.androidcast.sender.calibration;

/*********************************************************************
 * CalibrationSourceDimensionsTest.java
 * Created at: Sun 17 May 2026 15:45:19 +0200
 * Updated at: Wed 20 May 2026 15:17:13 +0200 by Anton Afanasyeu <a.afanasieff@gmail.com>
 * Commit: 5d8e82d2e60a21fff3138d2a394ee4e8b4c6dcb8
 * class CalibrationSourceDimensionsTest
 * Contributors:
 *    - Anton Afanasyeu <a.afanasieff@gmail.com> (2 commits, 31 lines)
 *    - Cursor Agent (project assistant)
 * Digest: SHA256	50aa2b1daf378985c37effa21dd38366008e726420154ed66098e86d1d048d17
**********************************************************************/
import static org.junit.Assert.assertEquals;

import com.foxx.androidcast.CastResolution;

import org.junit.Test;

public class CalibrationSourceDimensionsTest {

    @Test
    public void fromIntrinsic_usesAssetAspectAndEvenDimensions() {
        CastResolution.Size size = CalibrationSourceDimensions.fromIntrinsic(500, 401, 0);
        assertEquals(500, size.width);
        assertEquals(400, size.height);
    }

    @Test
    public void fromIntrinsic_capsLongEdgeWhenConfigured() {
        CastResolution.Size size = CalibrationSourceDimensions.fromIntrinsic(2000, 1600, 1000);
        assertEquals(1000, size.width);
        assertEquals(800, size.height);
    }
}
