Skip to content

Commit bfd8acc

Browse files
committed
chore: update public API snapshots for exception property assertions
Add verified snapshots for WithInnerException<T>, WithStackTraceContaining, and HasMessage assertion methods added to the exception assertions API.
1 parent c1ffbab commit bfd8acc

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

TUnit.PublicAPI/Tests.Assertions_Library_Has_No_API_Changes.DotNet8_0.verified.txt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,6 +1072,14 @@ namespace .Conditions
10721072
protected override .<.> CheckAsync(.<TActual> metadata) { }
10731073
protected override string GetExpectation() { }
10741074
}
1075+
public class ExceptionInnerExceptionOfTypeAssertion<TException, TInnerException> : .<TException>
1076+
where TException :
1077+
where TInnerException :
1078+
{
1079+
public ExceptionInnerExceptionOfTypeAssertion(.<TException> context) { }
1080+
protected override .<.> CheckAsync(.<TException> metadata) { }
1081+
protected override string GetExpectation() { }
1082+
}
10751083
public class ExceptionMessageContainsAssertion<TException> : .<TException>
10761084
where TException :
10771085
{
@@ -1114,6 +1122,13 @@ namespace .Conditions
11141122
protected override .<.> CheckAsync(.<TException> metadata) { }
11151123
protected override string GetExpectation() { }
11161124
}
1125+
public class ExceptionStackTraceContainsAssertion<TException> : .<TException>
1126+
where TException :
1127+
{
1128+
public ExceptionStackTraceContainsAssertion(.<TException> context, string expectedSubstring, comparison = 4) { }
1129+
protected override .<.> CheckAsync(.<TException> metadata) { }
1130+
protected override string GetExpectation() { }
1131+
}
11171132
[.("IsNotExecutable")]
11181133
public class FileIsNotExecutableAssertion : .<.FileInfo>
11191134
{
@@ -1976,6 +1991,8 @@ namespace .Conditions
19761991
protected override bool CheckExceptionType( actualException, out string? errorMessage) { }
19771992
public .<?> WithExceptionType( expectedExceptionType) { }
19781993
public .<> WithInnerException() { }
1994+
public .<TException, TInnerException> WithInnerException<TInnerException>()
1995+
where TInnerException : { }
19791996
public .<TException> WithMessage(string expectedMessage) { }
19801997
public .<TException> WithMessage(string expectedMessage, comparison) { }
19811998
public .<TException> WithMessageContaining(string expectedSubstring) { }
@@ -1985,13 +2002,17 @@ namespace .Conditions
19852002
public .<TException> WithMessageNotContaining(string notExpectedSubstring) { }
19862003
public .<TException> WithMessageNotContaining(string notExpectedSubstring, comparison) { }
19872004
public .<TException> WithParameterName(string expectedParameterName) { }
2005+
public .<TException> WithStackTraceContaining(string expectedSubstring) { }
2006+
public .<TException> WithStackTraceContaining(string expectedSubstring, comparison) { }
19882007
}
19892008
public class ThrowsExactlyAssertion<TException> : .<TException, .<TException>>
19902009
where TException :
19912010
{
19922011
public ThrowsExactlyAssertion(.<TException> context) { }
19932012
protected override bool IsExactTypeMatch { get; }
19942013
protected override bool CheckExceptionType( actualException, out string? errorMessage) { }
2014+
public .<TException, TInnerException> WithInnerException<TInnerException>()
2015+
where TInnerException : { }
19952016
public .<TException> WithMessage(string expectedMessage) { }
19962017
public .<TException> WithMessage(string expectedMessage, comparison) { }
19972018
public .<TException> WithMessageContaining(string expectedSubstring) { }
@@ -2001,6 +2022,8 @@ namespace .Conditions
20012022
public .<TException> WithMessageNotContaining(string notExpectedSubstring) { }
20022023
public .<TException> WithMessageNotContaining(string notExpectedSubstring, comparison) { }
20032024
public .<TException> WithParameterName(string expectedParameterName) { }
2025+
public .<TException> WithStackTraceContaining(string expectedSubstring) { }
2026+
public .<TException> WithStackTraceContaining(string expectedSubstring, comparison) { }
20042027
}
20052028
public class ThrowsNothingAssertion<TValue> : .<TValue>
20062029
{
@@ -2476,6 +2499,10 @@ namespace .Extensions
24762499
public static ..LengthWrapper HasLength(this .<string> source) { }
24772500
[("Use Length().IsEqualTo(expectedLength) instead.")]
24782501
public static . HasLength(this .<string> source, int expectedLength, [.("expectedLength")] string? expression = null) { }
2502+
public static .<TException> HasMessage<TException>(this .<TException> source, string expectedMessage, [.("expectedMessage")] string? expression = null)
2503+
where TException : { }
2504+
public static .<TException> HasMessage<TException>(this .<TException> source, string expectedMessage, comparison, [.("expectedMessage")] string? expression = null)
2505+
where TException : { }
24792506
public static .<TException> HasMessageContaining<TException>(this .<TException> source, string expectedSubstring, [.("expectedSubstring")] string? expression = null)
24802507
where TException : { }
24812508
public static .<TException> HasMessageContaining<TException>(this .<TException> source, string expectedSubstring, comparison, [.("expectedSubstring")] string? expression = null)
@@ -2571,6 +2598,9 @@ namespace .Extensions
25712598
public static .<TValue> ThrowsNothing<TValue>(this .<TValue> source) { }
25722599
public static .<TValue> WaitsFor<TValue>(this .<TValue> source, <.<TValue>, .<TValue>> assertionBuilder, timeout, ? pollingInterval = default, [.("timeout")] string? timeoutExpression = null, [.("pollingInterval")] string? pollingIntervalExpression = null) { }
25732600
public static ..WhenParsedIntoAssertion<T> WhenParsedInto<[.(..None | ..PublicMethods | ..Interfaces)] T>(this .<string> source) { }
2601+
public static .<TException, TInnerException> WithInnerException<TException, TInnerException>(this .<TException> source)
2602+
where TException :
2603+
where TInnerException : { }
25742604
public static .<TException> WithMessage<TException>(this .<TException> source, string expectedMessage, [.("expectedMessage")] string? expression = null)
25752605
where TException : { }
25762606
public static .<TException> WithMessage<TException>(this .<TException> source, string expectedMessage, comparison, [.("expectedMessage")] string? expression = null)
@@ -2589,6 +2619,10 @@ namespace .Extensions
25892619
where TException : { }
25902620
public static .<TException> WithParameterName<TException>(this .<TException> source, string expectedParameterName, [.("expectedParameterName")] string? expression = null)
25912621
where TException : { }
2622+
public static .<TException> WithStackTraceContaining<TException>(this .<TException> source, string expectedSubstring, [.("expectedSubstring")] string? expression = null)
2623+
where TException : { }
2624+
public static .<TException> WithStackTraceContaining<TException>(this .<TException> source, string expectedSubstring, comparison, [.("expectedSubstring")] string? expression = null)
2625+
where TException : { }
25922626
}
25932627
public static class BetweenAssertionExtensions
25942628
{

0 commit comments

Comments
 (0)