local BlizzardTOC = require("Tests.TOC.BlizzardTOC")

local RARITY_CORE_TOC = C_FileSystem.ReadFile("Rarity.toc")
local RarityCoreTOC = BlizzardTOC:DecodeFileContents(RARITY_CORE_TOC)

local expansionNamesByLevel = {
	[LE_EXPANSION_CLASSIC] = "LE_EXPANSION_CLASSIC",
	[LE_EXPANSION_BURNING_CRUSADE] = "LE_EXPANSION_BURNING_CRUSADE",
	[LE_EXPANSION_WRATH_OF_THE_LICH_KING] = "LE_EXPANSION_WRATH_OF_THE_LICH_KING",
	[LE_EXPANSION_CATACLYSM] = "LE_EXPANSION_CATACLYSM",
	[LE_EXPANSION_MISTS_OF_PANDARIA] = "LE_EXPANSION_MISTS_OF_PANDARIA",
	[LE_EXPANSION_WARLORDS_OF_DRAENOR] = "LE_EXPANSION_WARLORDS_OF_DRAENOR",
	[LE_EXPANSION_LEGION] = "LE_EXPANSION_LEGION",
	[LE_EXPANSION_BATTLE_FOR_AZEROTH] = "LE_EXPANSION_BATTLE_FOR_AZEROTH",
	[LE_EXPANSION_SHADOWLANDS] = "LE_EXPANSION_SHADOWLANDS",
	[LE_EXPANSION_DRAGONFLIGHT] = "LE_EXPANSION_DRAGONFLIGHT",
	[LE_EXPANSION_WAR_WITHIN] = "LE_EXPANSION_WAR_WITHIN",
}

-- These could probably be obtained from the DBC files, but it's not worth the effort
-- They aren't currently exported as shared constants (would increase memory usage)
local bonusRollCurrencies = {
	ELDER_CHARM_OF_GOOD_FORTUNE = 697,
	MOGU_RUNE_OF_FATE = 752,
	WARFORGED_SEAL = 776,
	SEAL_OF_TEMPERED_FATE = 994,
	SEAL_OF_INEVITABLE_FATE = 1129,
	SEAL_OF_BROKEN_FATE = 1273,
	SEAL_OF_WARTORN_FATE = 1580,
}

local currentExpansionLevel = LE_EXPANSION_LEVEL_CURRENT
local function resetSimulatedExpansionLevel()
	LE_EXPANSION_LEVEL_CURRENT = currentExpansionLevel
end

-- It's not currently possible to load all TOC files in order (due to the various Libs/WOW APIs involved)
-- For now, simulate loading the item DB manually and ignore the distinct lack of robustness here
local loadedDatabaseModules = {}
local function loadAddonFile(fileSystemPath)
	-- Can't use dofile or require because the WOW client passes the addon table using varargs
	local chunk = assert(loadfile(fileSystemPath))
	local module = chunk and chunk(_G.RARITY_ADDON_NAME, _G.RARITY_ADDON_TABLE)
	assert(type(module) == "table", format("Module %s didn't return a table value", fileSystemPath))

	return module
end

for index, fileSystemPath in ipairs(RarityCoreTOC.Files) do
	if fileSystemPath:find("^DB") then
		local module = loadAddonFile(fileSystemPath)
		loadedDatabaseModules[fileSystemPath] = module
	end
end

local function registerCleanupHooksForCategory(categoryName)
	before(function()
		table.clear(Rarity.ItemDB[categoryName:lower()])
	end)
	after(function()
		table.clear(Rarity.ItemDB[categoryName:lower()])
		resetSimulatedExpansionLevel()
	end)
end

local function assertModuleExportsNothingTo(moduleName, destination)
	loadAddonFile(moduleName)

	local expected = {}
	local actual = table.keys(destination)

	assertEquals(actual, expected)
end

local function assertModuleExportsEverythingTo(moduleName, destination)
	loadAddonFile(moduleName)

	local expected = {}
	local actual = table.keys(destination)

	local expected = table.keys(loadedDatabaseModules[moduleName])
	local actual = table.keys(destination)

	table.sort(actual)
	table.sort(expected)

	assertEquals(actual, expected)
end

local function expectNoExportsForExpansionGroup(modulePath, expansionLevel, group)
	local expansionID = expansionNamesByLevel[expansionLevel]
	it("should export NO items if the current expansion level is " .. expansionID, function()
		LE_EXPANSION_LEVEL_CURRENT = expansionLevel
		assertModuleExportsNothingTo(modulePath, group)
	end)
end

local function expectAllExportsForExpansionGroup(modulePath, expansionLevel, group)
	local expansionID = expansionNamesByLevel[expansionLevel]
	it("should export ALL items if the current expansion level is " .. expansionID, function()
		LE_EXPANSION_LEVEL_CURRENT = expansionLevel
		assertModuleExportsEverythingTo(modulePath, group)
	end)
end

describe("ItemDB", function()
	local L = LibStub("AceLocale-3.0"):GetLocale("Rarity")

	local uniqueIdentifierFields = {
		"creatureId",
		"itemId",
	}
	local groupNames = { "mounts", "pets", "toys" }

	it("should contain no duplicate identifiers", function()
		for _, groupName in ipairs(groupNames) do
			local group = Rarity.ItemDB[groupName]
			local referencedIdentifiers = {}
			for _, fieldName in ipairs(uniqueIdentifierFields) do
				referencedIdentifiers[fieldName] = {}
			end

			assert(group, "Missing group: " .. groupName)
			for englishItemName, itemDetails in pairs(group) do
				for _, fieldName in ipairs(uniqueIdentifierFields) do
					if englishItemName == "name" then
					-- Legacy key: name (probably shouldn't be stored in this table?)
					elseif itemDetails[fieldName] then
						table.insert(referencedIdentifiers[fieldName], itemDetails[fieldName])
						assert(
							referencedIdentifiers[fieldName][itemDetails[fieldName]] == nil,
							format(
								"Duplicate value %s for field %s referenced by item: %s",
								itemDetails[fieldName],
								fieldName,
								englishItemName
							)
						)
						referencedIdentifiers[fieldName][itemDetails[fieldName]] = true
					end
				end
			end
		end
	end)

	describe("Nodes", function()
		it("should register all recognized bonus roll currencies by default", function()
			assertEquals(table.count(Rarity.coins), table.count(bonusRollCurrencies))
			for name, currencyID in pairs(bonusRollCurrencies) do
				assert(Rarity.coins[currencyID], format("Missing bonus roll currency: %s", name))
			end
		end)

		it("should register all recognized fishing nodes by default", function()
			local numExpectedEntries = 128
			assertEquals(table.count(Rarity.fishnodes), numExpectedEntries)

			for name, isEnabled in pairs(Rarity.fishnodes) do
				assert(isEnabled, format("Entry'%s' should be enabled", name))
				assert(L[name], format("Missing localization phrase for entry '%s'", name))
				assert(L[name] == name, format("Unexpected localization phrase '%s' for entry '%s'", L[name], name))
			end
		end)

		it("should register all recognized mining nodes by default", function()
			local numExpectedEntries = 57
			assertEquals(table.count(Rarity.miningnodes), numExpectedEntries)

			for name, isEnabled in pairs(Rarity.miningnodes) do
				assert(isEnabled, format("Entry'%s' should be enabled", name))
				assert(L[name], format("Missing localization phrase for entry '%s'", name))
				assert(L[name] == name, format("Unexpected localization phrase '%s' for entry '%s'", L[name], name))
			end
		end)

		it("should register all recognized world objects by default", function()
			local numExpectedEntries = 55
			assertEquals(table.count(Rarity.opennodes), numExpectedEntries)

			for name, isEnabled in pairs(Rarity.opennodes) do
				assert(isEnabled, format("Entry'%s' should be enabled", name))
				assert(L[name], format("Missing localization phrase for entry '%s'", name))
				assert(L[name] == name, format("Unexpected localization phrase '%s' for entry '%s'", L[name], name))
			end
		end)
	end)

	describe("Mounts", function()
		local caseSensitiveCategoryName = "Mounts"
		local lowerCaseCategoryName = caseSensitiveCategoryName:lower()
		local group = Rarity.ItemDB[lowerCaseCategoryName]

		describe("Classic", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/Classic.lua", caseSensitiveCategoryName)

			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("TheBurningCrusade", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/TheBurningCrusade.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("HolidayEvents_TheBurningCrusade", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/HolidayEvents_TheBurningCrusade.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("WrathOfTheLichKing", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/WrathOfTheLichKing.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("HolidayEvents_WrathOfTheLichKing", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/HolidayEvents_WrathOfTheLichKing.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("Cataclysm", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/Cataclysm.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("MistsOfPandaria", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/MistsOfPandaria.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("WarlordsOfDraenor", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/WarlordsOfDraenor.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("HolidayEvents_WarlordsOfDraenor", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/HolidayEvents_WarlordsOfDraenor.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("Legion", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/Legion.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("BattleForAzeroth", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/BattleForAzeroth.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("Shadowlands", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/Shadowlands.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("Dragonflight", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/Dragonflight.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("HolidayEvents_Dragonflight", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/HolidayEvents_Dragonflight.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("TheWarWithin", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/TheWarWithin.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)
	end)

	describe("Pets", function()
		local caseSensitiveCategoryName = "Pets"
		local lowerCaseCategoryName = caseSensitiveCategoryName:lower()
		local group = Rarity.ItemDB[lowerCaseCategoryName]

		describe("Classic", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/Classic.lua", caseSensitiveCategoryName)

			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("HolidayEvents_Classic", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/HolidayEvents_Classic.lua", caseSensitiveCategoryName)

			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("TheBurningCrusade", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/TheBurningCrusade.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("HolidayEvents_TheBurningCrusade", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/HolidayEvents_TheBurningCrusade.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("WrathOfTheLichKing", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/WrathOfTheLichKing.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("HolidayEvents_WrathOfTheLichKing", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/HolidayEvents_WrathOfTheLichKing.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("Cataclysm", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/Cataclysm.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("HolidayEvents_Cataclysm", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/HolidayEvents_Cataclysm.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("MistsOfPandaria", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/MistsOfPandaria.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("HolidayEvents_MistsOfPandaria", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/HolidayEvents_MistsOfPandaria.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("WarlordsOfDraenor", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/WarlordsOfDraenor.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("HolidayEvents_WarlordsOfDraenor", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/HolidayEvents_WarlordsOfDraenor.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("Legion", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/Legion.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("BattleForAzeroth", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/BattleForAzeroth.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("Shadowlands", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/Shadowlands.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("Dragonflight", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/Dragonflight.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("HolidayEvents_Dragonflight", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/HolidayEvents_Dragonflight.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("TheWarWithin", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/TheWarWithin.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("HolidayEvents_TheWarWithin", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/HolidayEvents_TheWarWithin.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)
	end)

	describe("Toys", function()
		local caseSensitiveCategoryName = "Toys"
		local lowerCaseCategoryName = caseSensitiveCategoryName:lower()
		local group = Rarity.ItemDB[lowerCaseCategoryName]

		describe("Classic", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/Classic.lua", caseSensitiveCategoryName)

			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("TheBurningCrusade", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/TheBurningCrusade.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("HolidayEvents_TheBurningCrusade", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/HolidayEvents_TheBurningCrusade.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("WrathOfTheLichKing", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/WrathOfTheLichKing.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("HolidayEvents_WrathOfTheLichKing", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/HolidayEvents_WrathOfTheLichKing.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("Cataclysm", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/Cataclysm.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("HolidayEvents_Cataclysm", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/HolidayEvents_Cataclysm.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("MistsOfPandaria", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/MistsOfPandaria.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("HolidayEvents_MistsOfPandaria", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/HolidayEvents_MistsOfPandaria.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("WarlordsOfDraenor", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/WarlordsOfDraenor.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("HolidayEvents_WarlordsOfDraenor", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/HolidayEvents_WarlordsOfDraenor.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("Legion", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/Legion.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("HolidayEvents_Legion", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/HolidayEvents_Legion.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("BattleForAzeroth", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/BattleForAzeroth.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("HolidayEvents_BattleForAzeroth", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/HolidayEvents_BattleForAzeroth.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("Shadowlands", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/Shadowlands.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("HolidayEvents_Shadowlands", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/HolidayEvents_Shadowlands.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("Dragonflight", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/Dragonflight.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("HolidayEvents_Dragonflight", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/HolidayEvents_Dragonflight.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)

		describe("TheWarWithin", function()
			registerCleanupHooksForCategory(caseSensitiveCategoryName)
			local modulePath = format("DB/%s/TheWarWithin.lua", caseSensitiveCategoryName)

			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CLASSIC, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BURNING_CRUSADE, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WRATH_OF_THE_LICH_KING, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_CATACLYSM, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_MISTS_OF_PANDARIA, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_WARLORDS_OF_DRAENOR, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_LEGION, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_BATTLE_FOR_AZEROTH, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_SHADOWLANDS, group)
			expectNoExportsForExpansionGroup(modulePath, LE_EXPANSION_DRAGONFLIGHT, group)
			expectAllExportsForExpansionGroup(modulePath, LE_EXPANSION_WAR_WITHIN, group)
		end)
	end)
end)
