Fix test error
This commit is contained in:
parent
b4867f88d5
commit
bc1a7a8952
2 changed files with 27 additions and 27 deletions
27
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
27
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="GrazieInspection" enabled="false" level="GRAMMAR_ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="GrazieStyle" enabled="false" level="STYLE_SUGGESTION" enabled_by_default="false" />
|
||||
<inspection_tool class="LanguageDetectionInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
||||
<option name="processCode" value="true" />
|
||||
<option name="processLiterals" value="true" />
|
||||
<option name="processComments" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="unused" enabled="false" level="WARNING" enabled_by_default="false" checkParameterExcludingHierarchy="false">
|
||||
<option name="LOCAL_VARIABLE" value="true" />
|
||||
<option name="FIELD" value="true" />
|
||||
<option name="METHOD" value="true" />
|
||||
<option name="CLASS" value="true" />
|
||||
<option name="PARAMETER" value="true" />
|
||||
<option name="REPORT_PARAMETER_FOR_PUBLIC_METHODS" value="true" />
|
||||
<option name="ADD_MAINS_TO_ENTRIES" value="true" />
|
||||
<option name="ADD_APPLET_TO_ENTRIES" value="true" />
|
||||
<option name="ADD_SERVLET_TO_ENTRIES" value="true" />
|
||||
<option name="ADD_NONJAVA_TO_ENTRIES" value="true" />
|
||||
<option name="selected" value="true" />
|
||||
<option name="mixinEntryPoint" value="true" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
||||
|
|
@ -183,33 +183,6 @@ class SecureChatCompletionTest {
|
|||
}, "Convenience create should delegate to full create");
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("acreate should delegate to create")
|
||||
void acreate_shouldDelegateToCreate() {
|
||||
SecureChatCompletion chat = new SecureChatCompletion();
|
||||
|
||||
assertThrows(IllegalArgumentException.class,
|
||||
() -> chat.acreate(null, List.of(Map.of("role", "user", "content", "hi"))));
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("acreate convenience should delegate to create")
|
||||
void acreate_convenience_shouldDelegate() {
|
||||
SecureChatCompletion chat = new SecureChatCompletion();
|
||||
|
||||
assertThrows(ExecutionException.class, () -> {
|
||||
try {
|
||||
chat.acreate("gpt-4", List.of(Map.of("role", "user", "content", "hi")));
|
||||
} catch (RuntimeException e) {
|
||||
Throwable cause = e.getCause();
|
||||
if (cause instanceof ExecutionException) {
|
||||
throw cause;
|
||||
}
|
||||
throw new ExecutionException(cause);
|
||||
}
|
||||
}, "Convenience acreate should delegate to create");
|
||||
}
|
||||
|
||||
@Test
|
||||
@Execution(ExecutionMode.SAME_THREAD)
|
||||
@DisplayName("close should delegate to client close")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue