summaryrefslogtreecommitdiff
path: root/addons/gdUnit4/src/core/discovery/GdUnitTestDiscoverSink.gd
diff options
context:
space:
mode:
Diffstat (limited to 'addons/gdUnit4/src/core/discovery/GdUnitTestDiscoverSink.gd')
-rw-r--r--addons/gdUnit4/src/core/discovery/GdUnitTestDiscoverSink.gd13
1 files changed, 13 insertions, 0 deletions
diff --git a/addons/gdUnit4/src/core/discovery/GdUnitTestDiscoverSink.gd b/addons/gdUnit4/src/core/discovery/GdUnitTestDiscoverSink.gd
new file mode 100644
index 0000000..5d0e5b6
--- /dev/null
+++ b/addons/gdUnit4/src/core/discovery/GdUnitTestDiscoverSink.gd
@@ -0,0 +1,13 @@
+## A static utility class that acts as a central sink for test case discovery events in GdUnit4.
+## Instead of implementing custom sink classes, test discovery consumers should connect to
+## the GdUnitSignals.gdunit_test_discovered signal to receive test case discoveries.
+## This design allows for a more flexible and decoupled test discovery system.
+class_name GdUnitTestDiscoverSink
+extends RefCounted
+
+
+## Emits a discovered test case through the GdUnitSignals system.[br]
+## Sends the test case to all listeners connected to the gdunit_test_discovered signal.[br]
+## [member test_case] The discovered test case to be broadcast to all connected listeners.
+static func discover(test_case: GdUnitTestCase) -> void:
+ GdUnitSignals.instance().gdunit_test_discover_added.emit(test_case)