| | 1 | | using System; |
| | 2 | | using System.Reflection; |
| | 3 | | using NUnit.Framework; |
| | 4 | | using UnityEngine; |
| | 5 | |
|
| | 6 | | public abstract class SensorTestBase : TestBase { |
| | 7 | | protected SimManager simManager; |
| | 8 | |
|
| | 9 | | [SetUp] |
| 0 | 10 | | public virtual void Setup() { |
| | 11 | | // Initialize SimManager |
| 0 | 12 | | var simManagerGameObject = new GameObject("SimManager"); |
| 0 | 13 | | simManager = simManagerGameObject.AddComponent<SimManager>(); |
| 0 | 14 | | simManager.simulationConfig = new SimulationConfig(); // Set up a basic config if needed |
| | 15 | |
|
| 0 | 16 | | SimManager.Instance = simManager; |
| 0 | 17 | | } |
| | 18 | |
|
| | 19 | | [TearDown] |
| 0 | 20 | | public virtual void Teardown() { |
| | 21 | | // Clean up SimManager |
| 0 | 22 | | if (simManager != null) { |
| 0 | 23 | | GameObject.DestroyImmediate(simManager.gameObject); |
| 0 | 24 | | } |
| 0 | 25 | | } |
| | 26 | | } |