public IEnumerator GeometryVisionGetsCreatedWithoutFactory( [ValueSource(typeof(TestUtilities), nameof(TestUtilities.GetSimpleTestScenePathsForEntities))] string scenePath) { TestUtilities.SetupScene(scenePath); for (int i = 0; i < 50; i++) { yield return null; } var geoVision = Instantiate(new GameObject("geoVision")); geoVision.transform.position = new Vector3(0f, 0f, -6f); geoVision.AddComponent<GeometryVision>(); var geometryVisionComponent = geoVision.GetComponent<GeometryVision>(); geometryVisionComponent.GameObjectBasedProcessing.Value = true; geometryVisionComponent.EntityProcessing.Value = true; yield return null; int amountOfObjectsInScene = 0; IGeoProcessor processor = geoVision.GetComponent<GeometryVision>().Runner.GetProcessor<GeometryVisionProcessor>(); IGeoProcessor processorEntities = geoVision.GetComponent<GeometryVision>().Runner .GetProcessor<GeometryVisionEntityProcessor>(); amountOfObjectsInScene = processor.CountSceneObjects(); yield return null; Assert.True(amountOfObjectsInScene > 0); amountOfObjectsInScene = processorEntities.CountSceneObjects(); Assert.True(amountOfObjectsInScene > 0); }
public IEnumerator GeometryVisionGetsCreatedWithFactory( [ValueSource(typeof(TestUtilities), nameof(TestUtilities.GetSimpleTestScenePathsForEntities))] string scenePath) { TestUtilities.SetupScene(scenePath); for (int i = 0; i < 50; i++) { yield return null; } var geoVision = TestUtilities.SetupGeoVision(new Vector3(0f, 0f, -6f), new GeometryVisionFactory(factorySettings)); yield return null; int amountOfObjectsInScene = 0; IGeoProcessor processor = geoVision.GetComponent<GeometryVision>().Runner.GetProcessor<GeometryVisionProcessor>(); IGeoProcessor processorEntities = geoVision.GetComponent<GeometryVision>().Runner .GetProcessor<GeometryVisionEntityProcessor>(); amountOfObjectsInScene = processor.CountSceneObjects(); yield return null; Assert.True(amountOfObjectsInScene > 0); amountOfObjectsInScene = processorEntities.CountSceneObjects(); Assert.True(amountOfObjectsInScene > 0); }