package com.lingniu.ingest.protocol.jt808.downlink;

import org.junit.jupiter.api.Test;

import java.util.List;

import static org.assertj.core.api.Assertions.assertThat;

class Jt808CommandsTest {

    @Test
    void deleteAreaEncodesCountAndDwordAreaIds() {
        var command = Jt808Commands.deleteArea(List.of(1L, 0x01020304L));

        assertThat(command.messageId()).isEqualTo(0x8601);
        assertThat(command.body()).containsExactly(
                0x02,
                0x00, 0x00, 0x00, 0x01,
                0x01, 0x02, 0x03, 0x04);
    }
}
