create Packets behaviour for testing

This commit is contained in:
Fly Dev 2025-06-23 14:16:32 +00:00
parent 07dfabac98
commit f6e2e9e4a8

View file

@ -1,13 +1,8 @@
defmodule Aprs.PacketsBehaviour do
@moduledoc """
Behavior definition for the Packets context.
This allows us to mock the Packets module in tests.
Behaviour for Packets module to allow mocking in tests
"""
@callback get_packets_for_replay(map()) :: [Aprs.Packet.t()]
@callback get_recent_packets(map()) :: [Aprs.Packet.t()]
@callback get_historical_packet_count(map()) :: non_neg_integer()
@callback stream_packets_for_replay(map()) :: Enumerable.t()
@callback clean_old_packets() :: non_neg_integer()
@callback clean_packets_older_than(pos_integer()) :: non_neg_integer()
end