using NUnit.Framework;
using UnityEngine.SceneManagement;
using UnityEditor.SceneManagement;
using LLM.Editor.Analysis;

namespace LLM.Editor.Tests.Unit
{
    [TestFixture]
    public class ActiveSceneProviderTests
    {
        [Test]
        public void GetContext_ReturnsCorrectInfoForActiveScene()
        {
            // Arrange
            var provider = new ActiveSceneProvider();

            // Act
            var context = provider.GetContext(null, null);

            // Assert
            Assert.IsInstanceOf<ActiveSceneProvider.SceneInfo>(context);
            var sceneInfo = (ActiveSceneProvider.SceneInfo)context;

            // The name of a new, unsaved scene is empty
            Assert.AreEqual(string.Empty, sceneInfo.name); 
            Assert.AreEqual(string.Empty, sceneInfo.path);
            Assert.IsTrue(sceneInfo.isValid);
            // A new scene is not dirty by default
            Assert.IsFalse(sceneInfo.isDirty);
        }
    }
}