package com.foxx.androidcast.remoteaccess;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.junit.Test;

public class RemoteAccessFailureReasonTest {

    @Test
    public void isControlPlaneMethod_detectsRunPoll() {
        assertTrue(RemoteAccessFailureReason.isControlPlaneMethod("RemoteAccessService.runPoll"));
        assertTrue(RemoteAccessFailureReason.isControlPlaneMethod("RemoteAccessHeartbeatClient.postRa"));
        assertFalse(RemoteAccessFailureReason.isControlPlaneMethod("VpnServiceClient.applyWireGuardConfig"));
    }

    @Test
    public void isTunnelMethod_detectsVpnAndRssh() {
        assertTrue(RemoteAccessFailureReason.isTunnelMethod("VpnServiceClient.applyWireGuardConfig"));
        assertTrue(RemoteAccessFailureReason.isTunnelMethod("ReverseSshTunnelBridge.applyConfig"));
        assertFalse(RemoteAccessFailureReason.isTunnelMethod("RemoteAccessService.runPoll"));
    }
}
