Skip to content

Commit 0e99d21

Browse files
committed
fix: fix code format
Signed-off-by: Sun Yuhan <[email protected]>
1 parent 701622e commit 0e99d21

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

models/spring-ai-deepseek/src/test/java/org/springframework/ai/deepseek/api/DeepSeekStreamFunctionCallingHelperTest.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class DeepSeekStreamFunctionCallingHelperTest {
4040

4141
@BeforeEach
4242
void setUp() {
43-
helper = new DeepSeekStreamFunctionCallingHelper();
43+
this.helper = new DeepSeekStreamFunctionCallingHelper();
4444
}
4545

4646
@Test
@@ -49,7 +49,7 @@ void mergeWhenPreviousIsNullShouldReturnCurrent() {
4949
ChatCompletionChunk current = new ChatCompletionChunk("id1", List.of(), 123L, "model1", null, null, null, null);
5050

5151
// When
52-
ChatCompletionChunk result = helper.merge(null, current);
52+
ChatCompletionChunk result = this.helper.merge(null, current);
5353

5454
// Then
5555
assertThat(result).isEqualTo(current);
@@ -63,7 +63,7 @@ void mergeShouldMergeBasicFieldsFromCurrentAndPrevious() {
6363
ChatCompletionChunk current = new ChatCompletionChunk("id2", List.of(), null, null, null, null, null, null);
6464

6565
// When
66-
ChatCompletionChunk result = helper.merge(previous, current);
66+
ChatCompletionChunk result = this.helper.merge(previous, current);
6767

6868
// Then
6969
assertThat(result.id()).isEqualTo("id2"); // from current
@@ -86,7 +86,7 @@ void mergeShouldMergeMessagesContent() {
8686
null, null);
8787

8888
// When
89-
ChatCompletionChunk result = helper.merge(previous, current);
89+
ChatCompletionChunk result = this.helper.merge(previous, current);
9090

9191
// Then
9292
assertThat(result.choices().get(0).delta().content()).isEqualTo("Hello World!");
@@ -115,7 +115,7 @@ void mergeShouldHandleToolCallsMerging() {
115115
null, null);
116116

117117
// When
118-
ChatCompletionChunk result = helper.merge(previous, current);
118+
ChatCompletionChunk result = this.helper.merge(previous, current);
119119

120120
// Then
121121
assertThat(result.choices()).hasSize(1);
@@ -138,7 +138,7 @@ void mergeWithSingleToolCallShouldWork() {
138138
null);
139139

140140
// When
141-
ChatCompletionChunk result = helper.merge(previous, current);
141+
ChatCompletionChunk result = this.helper.merge(previous, current);
142142

143143
// Then
144144
assertThat(result).isNotNull();
@@ -148,7 +148,7 @@ void mergeWithSingleToolCallShouldWork() {
148148
@Test
149149
void isStreamingToolFunctionCallWhenNullChunkShouldReturnFalse() {
150150
// When & Then
151-
assertThat(helper.isStreamingToolFunctionCall(null)).isFalse();
151+
assertThat(this.helper.isStreamingToolFunctionCall(null)).isFalse();
152152
}
153153

154154
@Test
@@ -157,7 +157,7 @@ void isStreamingToolFunctionCallWhenEmptyChoicesShouldReturnFalse() {
157157
ChatCompletionChunk chunk = new ChatCompletionChunk("id", List.of(), 123L, "model", null, null, null, null);
158158

159159
// When & Then
160-
assertThat(helper.isStreamingToolFunctionCall(chunk)).isFalse();
160+
assertThat(this.helper.isStreamingToolFunctionCall(chunk)).isFalse();
161161
}
162162

163163
@Test
@@ -170,7 +170,7 @@ void isStreamingToolFunctionCallWhenHasToolCallsShouldReturnTrue() {
170170
null);
171171

172172
// When & Then
173-
assertThat(helper.isStreamingToolFunctionCall(chunk)).isTrue();
173+
assertThat(this.helper.isStreamingToolFunctionCall(chunk)).isTrue();
174174
}
175175

176176
@Test
@@ -183,7 +183,7 @@ void isStreamingToolFunctionCallFinishWhenFinishReasonIsToolCallsShouldReturnTru
183183
null);
184184

185185
// When & Then
186-
assertThat(helper.isStreamingToolFunctionCallFinish(chunk)).isTrue();
186+
assertThat(this.helper.isStreamingToolFunctionCallFinish(chunk)).isTrue();
187187
}
188188

189189
@Test
@@ -205,7 +205,7 @@ void mergeWhenCurrentToolCallsIsEmptyListShouldNotThrowException() {
205205
null, null);
206206

207207
// When
208-
ChatCompletionChunk result = helper.merge(previous, current);
208+
ChatCompletionChunk result = this.helper.merge(previous, current);
209209

210210
// Then
211211
assertThat(result).isNotNull();

0 commit comments

Comments
 (0)