Skip to content

Commit e0ee1be

Browse files
committed
rename IsCancelled to IsCanceled - American English
1 parent 9c6314f commit e0ee1be

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/ModelContextProtocol.Core/Protocol/ElicitResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,5 @@ public sealed class ElicitResult : Result
6464
/// </summary>
6565
/// <returns><see langword="true"/> if the action is "cancel"; otherwise, <see langword="false"/>.</returns>
6666
[JsonIgnore]
67-
public bool IsCancelled => string.Equals(Action, "cancel", StringComparison.OrdinalIgnoreCase);
67+
public bool IsCanceled => string.Equals(Action, "cancel", StringComparison.OrdinalIgnoreCase);
6868
}

tests/ModelContextProtocol.Tests/Protocol/ElicitResultTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public void IsCancelled_Returns_True_For_VariousCancelledActions(string action)
5050
var result = new ElicitResult { Action = action };
5151

5252
// Act
53-
var isCancelled = result.IsCancelled;
53+
var isCancelled = result.IsCanceled;
5454

5555
// Assert
5656
Assert.True(isCancelled);
@@ -83,7 +83,7 @@ public void IsCancelled_Returns_True_For_DefaultAction()
8383
var result = new ElicitResult();
8484

8585
// Act & Assert
86-
Assert.True(result.IsCancelled);
86+
Assert.True(result.IsCanceled);
8787
}
8888

8989
[Fact]
@@ -113,7 +113,7 @@ public void IsCancelled_Returns_False_For_Null_Action()
113113
var result = new ElicitResult { Action = null! };
114114

115115
// Act & Assert
116-
Assert.False(result.IsCancelled);
116+
Assert.False(result.IsCanceled);
117117
}
118118

119119
[Theory]
@@ -132,7 +132,7 @@ public void JsonSerialization_ExcludesJsonIgnoredProperties(string action)
132132
// Assert
133133
Assert.DoesNotContain("IsAccepted", json);
134134
Assert.DoesNotContain("IsDeclined", json);
135-
Assert.DoesNotContain("IsCancelled", json);
135+
Assert.DoesNotContain("IsCanceled", json);
136136
Assert.Contains($"\"action\":\"{action}\"", json);
137137
}
138138

@@ -155,6 +155,6 @@ public void JsonRoundTrip_PreservesActionAndComputedProperties(string action, bo
155155
Assert.Equal(action, deserialized.Action);
156156
Assert.Equal(isAccepted, deserialized.IsAccepted);
157157
Assert.Equal(isDeclined, deserialized.IsDeclined);
158-
Assert.Equal(isCancelled, deserialized.IsCancelled);
158+
Assert.Equal(isCancelled, deserialized.IsCanceled);
159159
}
160160
}

0 commit comments

Comments
 (0)