#include #include "intelligence-engine/IntelligenceEngine.h" using namespace Warfactory::Intelligence; class IntelligenceEngineAPITest : public ::testing::Test { protected: void SetUp() override { engine = std::make_unique(); ASSERT_TRUE(engine->initialize()); } void TearDown() override { engine->shutdown(); } std::unique_ptr engine; }; TEST_F(IntelligenceEngineAPITest, AdaptiveMetricsScaling) { // Test adaptive scaling: 2 pts/min (1 company) → 0.4 pts/min (5 companies) // Single company: full metrics engine->adjustScalingForMultiplayer(1); // TODO: Verify high granularity metrics collection // Multiple companies: scaled down metrics engine->adjustScalingForMultiplayer(5); // TODO: Verify reduced granularity but same total volume } TEST_F(IntelligenceEngineAPITest, MetricsVolume) { // Test 3.1GB metrics per game with database storage (not RAM) int companyId = 1; std::string testData = "production_data_sample"; engine->collectMetrics(companyId, testData); engine->pushMetricsToDatabase(); // TODO: Verify data pushed to database, not held in RAM // TODO: Verify total volume tracking toward 3.1GB target } TEST_F(IntelligenceEngineAPITest, SatelliteIntelligence) { // Test progressive satellite reconnaissance levels int x = 100, y = 100; // Basic level: buildings detection engine->updateSatelliteIntel(x, y, "buildings"); auto intel1 = engine->getIntelligence(1, x, y); // Advanced level: company-specific factories engine->updateSatelliteIntel(x, y, "company_specific"); auto intel2 = engine->getIntelligence(1, x, y); // TODO: Verify intel2 contains more detailed information than intel1 } TEST_F(IntelligenceEngineAPITest, FOWChunkGranularity) { // Test FOW at chunk level (ultra-light implementation) int companyId = 1; int chunkX = 5, chunkY = 7; engine->setChunkVisibility(companyId, chunkX, chunkY, true); // TODO: Verify visibility stored efficiently (~1 bit per chunk) // TODO: Test memory footprint is minimal }