using Godot; using GoDotTest; namespace GodotComponentTest.tests; public class StreamContainerTests : TestClass { private readonly Node _testScene; private TileWorld _tileWorld; private StreamContainer _streamContainer; private readonly PackedScene _tileWorldScene = GD.Load("res://scenes/TileWorld.tscn"); private readonly PackedScene _streamContainerScene = GD.Load("res://scenes/StreamContainer.tscn"); public StreamContainerTests(Node testScene) : base(testScene) { _testScene = testScene; } [Setup] public void Setup() { _tileWorld = (TileWorld)_tileWorldScene.Instance(); _tileWorld.HexGrid = new HexGrid(); _testScene.AddChild(_tileWorld); _streamContainer = (StreamContainer)_streamContainerScene.Instance(); foreach (Node node in _testScene.GetChildren()) { if (node is TileWorld) { _streamContainer.World = node.GetPath(); } } _testScene.AddChild(_streamContainer); } [Cleanup] public void Cleanup() { foreach (Node node in _testScene.GetChildren()) { node.QueueFree(); } _streamContainer.QueueFree(); _tileWorld.QueueFree(); } [Test] public void Plane2DDistSimple() { // _streamContainer.UpdateRects(new Vector2(0, 0)); // _streamContainer.UpdateRects(new Vector2(1, 0)); } }