using System; using System.Collections; using System.Collections.Generic; using NUnit.Framework; using TKS.OutGame; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.TestTools; using UnityEngine.UI; namespace TKS.Tests { /// /// 이벤트(PD 2026-11-19 「게임에 구현해」 · EventRules · EventScreen) — 기대값은 표(Resources/Event · UI/Event)에서 읽는다(C45). /// ① 규칙: 출석(접속한 날마다 1칸 · 같은 날 두 번 못 받음 · 일일 14일 = 다 받으면 다음 접속일에 새 회차 · 오픈 기념 = 기간 끝나면 못 받음) · 7일 미션(일차 열림 · 접속 · 세는 동작 · 점수 단계) · /// 룰렛(비용 · 복주머니 부족 · 최종 보상 = n회째 반드시 · 한정 = n회 안에 반드시 · 횟수 보상) · 이벤트 미션(일일 = 날마다 다시 · 회차) · 광고(하루 횟수) · 세션 훅(금화 사용). /// ② 화면: 로비 「이벤트」 → 이벤트 화면 · 메인 하단 탭 꺼짐 · 이벤트 탭 4 · 쪽 3 · 층(Art Static · Info Event + 레이캐스터 · Fx Frame) · 받기 누름 · 특별 이벤트 = 토스트 · 팝업(이벤트 미션 · 선물 팩) · 뒤로 = 팝업 → 로비 · 유료 팩 = 토스트(지급 0). /// public class EventTests { [TearDown] public void TearDown() { SaveStore.UseMemory(false); } static void AssertNested(Canvas c, UiRate rate, string what) { Assert.IsNotNull(c, what + ": 캔버스 없음"); Assert.IsNotNull(c.transform.parent != null ? c.transform.parent.GetComponentInParent(true) : null, what + ": 중첩이어야 함"); Assert.IsFalse(c.overrideSorting, what + ": overrideSorting 끔"); var tag = c.GetComponent(); Assert.IsNotNull(tag, what + ": 등급 표시 없음"); Assert.AreEqual(rate, tag.rate, what + ": 등급"); } static IEnumerator Boot() { WorldProgress.Reset(); SaveStore.UseMemory(true); SceneManager.LoadScene("Battle"); yield return null; yield return null; } /// 룰렛 회차 첫날 다음 날 정오(현지) — 기간 안. static DateTime Inside() { var a = EventRules.RouletteStart; Assert.IsTrue(a.HasValue, "표 roulette_start 읽기"); return a.Value.AddDays(1).AddHours(12); } static void Click(Transform t, string what) { Assert.IsNotNull(t, what + " 없음"); var b = t.GetComponent