Skip to content

Commit 7bc2ff6

Browse files
Copilotedburns
andauthored
Fix AbortEvent tests to use valid AbortReason enum values after codegen update
The codegen regeneration changed AbortEvent.data.reason from a free-form String to a strict AbortReason enum. Updated tests to use valid values (user_initiated, user_abort) instead of the old strings. Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
1 parent f914e5c commit 7bc2ff6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/test/java/com/github/copilot/sdk/SessionEventDeserializationTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ void testParseAbortEvent() throws Exception {
736736
{
737737
"type": "abort",
738738
"data": {
739-
"reason": "user_requested"
739+
"reason": "user_initiated"
740740
}
741741
}
742742
""";
@@ -1987,14 +1987,14 @@ void testAbortEventAllFields() throws Exception {
19871987
{
19881988
"type": "abort",
19891989
"data": {
1990-
"reason": "user_cancelled"
1990+
"reason": "user_abort"
19911991
}
19921992
}
19931993
""";
19941994

19951995
var event = (AbortEvent) parseJson(json);
19961996
assertNotNull(event);
1997-
assertEquals("user_cancelled", event.getData().reason());
1997+
assertEquals(AbortReason.USER_ABORT, event.getData().reason());
19981998
}
19991999

20002000
@Test

0 commit comments

Comments
 (0)