feat(ads/seo/release): v1.2.0 with live Google Ads, isolated ad profile, ads.txt, and SEO/AEO/GEO optimization

This commit is contained in:
Yun Chan 2026-09-14 00:39:44 +09:00
parent a88aafa1e5
commit 0e568f1f0a
975 changed files with 130593 additions and 16783 deletions

View file

@ -0,0 +1,64 @@
using System;
using Paca.Mobile.Core;
using Xunit;
namespace Paca.Tests.Core;
public class BatteryPowerGovernorGateTests
{
[Fact]
public void Gate249_BatteryPowerGovernor_DetectsLowBattery_AndEntersLowPowerMode()
{
var governor = new BatteryPowerGovernor();
// 15% battery, discharging
governor.UpdateBatteryState(batteryLevelPercent: 15, isCharging: false);
Assert.True(governor.IsLowPowerModeActive);
Assert.Equal(1, governor.MaxRecommendedDownloads);
}
[Fact]
public void Gate250_BatteryPowerGovernor_AcPowerConnected_RestoresHighPerformance()
{
var governor = new BatteryPowerGovernor();
// 15% battery, but charging on AC
governor.UpdateBatteryState(batteryLevelPercent: 15, isCharging: true);
Assert.False(governor.IsLowPowerModeActive);
Assert.True(governor.MaxRecommendedDownloads >= 4);
}
[Fact]
public void Gate251_BatteryPowerGovernor_ConfigurableThreshold()
{
var governor = new BatteryPowerGovernor(lowBatteryThresholdPercent: 30);
// 25% battery with 30% threshold -> low power active
governor.UpdateBatteryState(batteryLevelPercent: 25, isCharging: false);
Assert.True(governor.IsLowPowerModeActive);
// 35% battery with 30% threshold -> normal
governor.UpdateBatteryState(batteryLevelPercent: 35, isCharging: false);
Assert.False(governor.IsLowPowerModeActive);
}
[Fact]
public void Gate252_BatteryPowerGovernor_AppliesPlayerRenderPolicy()
{
var governor = new BatteryPowerGovernor();
// Low power
governor.UpdateBatteryState(batteryLevelPercent: 10, isCharging: false);
var lowPolicy = governor.GetRenderPolicy();
Assert.False(lowPolicy.EnableGlassmorphismBlur);
Assert.Equal(30, lowPolicy.TargetFramerate);
// High power
governor.UpdateBatteryState(batteryLevelPercent: 90, isCharging: false);
var highPolicy = governor.GetRenderPolicy();
Assert.True(highPolicy.EnableGlassmorphismBlur);
Assert.Equal(60, highPolicy.TargetFramerate);
}
}