#include <Arduino.h>
#include <unity.h>

#include "app_context.h"
#include "receiver_pipeline.h"
#include "sender_state_machine.h"
#include "config.h"

static void test_refactor_headers_and_types() {
  SenderStateMachineConfig sender_cfg = {};
  sender_cfg.short_id = 0xF19C;
  sender_cfg.device_id = "dd3-F19C";

  ReceiverSharedState shared = {};
  ReceiverPipelineConfig receiver_cfg = {};
  receiver_cfg.short_id = 0xF19C;
  receiver_cfg.device_id = "dd3-F19C";
  receiver_cfg.shared = &shared;

  SenderStateMachine sender_sm;
  ReceiverPipeline receiver_pipe;

  TEST_ASSERT_EQUAL_UINT16(0xF19C, sender_cfg.short_id);
  TEST_ASSERT_NOT_NULL(receiver_cfg.shared);
  (void)sender_sm;
  (void)receiver_pipe;
}

static void test_ha_manufacturer_constant() {
  TEST_ASSERT_EQUAL_STRING("AcidBurns", HA_MANUFACTURER);
}

void setup() {
  UNITY_BEGIN();
  RUN_TEST(test_refactor_headers_and_types);
  RUN_TEST(test_ha_manufacturer_constant);
  UNITY_END();
}

void loop() {}

