#include <catch2/catch_test_macros.hpp>
#include <fmt/core.h>
#include <string>
#include "sound.hpp"
#include "dinkyecs.hpp"

using DinkyECS::Entity;
using namespace fmt;

TEST_CASE("confirm basic functionality", "[sounds]") {
  REQUIRE_THROWS([&](){SoundManager sounds("./BADassets");}());

  SoundManager sounds("./assets");

  REQUIRE_THROWS(sounds.load("hit", "badfileDOESNOTEXIST.wav"));
  REQUIRE_THROWS(sounds.play("hit"));

  sounds.load("hit", "hit.wav");
  sounds.play("hit");
  sounds.playAt("hit", 1, 1, 1);
}
