Class OpenAIProviderPrivateMethodsTest
java.lang.Object
org.machanism.machai.ai.provider.openai.OpenAIProviderPrivateMethodsTest
Unit tests for OpenAIProvider private/package-private helper methods.
These tests deliberately avoid network access by using reflection and by exercising only pure logic and error handling paths.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void(package private) void(package private) void(package private) void(package private) void(package private) void(package private) voidtearDown()
-
Constructor Details
-
OpenAIProviderPrivateMethodsTest
OpenAIProviderPrivateMethodsTest()
-
-
Method Details
-
tearDown
@AfterEach void tearDown() -
safelyInvokeTool_whenToolThrowsIOException_returnsErrorMessageInsteadOfThrowing
@Test void safelyInvokeTool_whenToolThrowsIOException_returnsErrorMessageInsteadOfThrowing() throws Exception- Throws:
Exception
-
firstNonBlankReasoning_whenAllBlank_returnsNull
- Throws:
Exception
-
captureUsage_whenUsageMissing_setsZeroUsage
- Throws:
Exception
-
callFunction_whenArgumentsInvalidJson_throwsIllegalArgumentException
- Throws:
Exception
-
callFunction_whenToolMatches_passesParsedJsonAndWorkingDirIntoHandler
- Throws:
Exception
-
callFunction_whenNoMatchingTool_returnsNull
- Throws:
Exception
-