278 references to ArgumentFormatter
Microsoft.DotNet.XUnitAssert.Tests (153)
AsyncCollectionAssertsTests.cs (6)
430
$"Collection: [\"a\", null, \"b\", null, \"c\", {
ArgumentFormatter
.Ellipsis}]" + Environment.NewLine +
770
Assert.Equal(message.Replace("$$ELLIPSIS$$",
ArgumentFormatter
.Ellipsis), ex.Message);
1146
$"Expected: Not {expectedType.PadRight(padding)}[1, 2, 3, 4, 5, {
ArgumentFormatter
.Ellipsis}]" + Environment.NewLine +
1147
$"Actual: {actualType.PadRight(padding)}[1, 2, 3, 4, 5, {
ArgumentFormatter
.Ellipsis}]",
1433
$"Collection: [1, 2, 3, 4, 5, {
ArgumentFormatter
.Ellipsis}]",
1527
$"Collection: [1, 2, 3, 4, 5, {
ArgumentFormatter
.Ellipsis}]" + Environment.NewLine +
CollectionAssertsTests.cs (13)
464
$"Collection: [\"a\", null, \"b\", null, \"c\", {
ArgumentFormatter
.Ellipsis}]" + Environment.NewLine +
795
Environment.NewLine + "Expected: " + expectedType +
ArgumentFormatter
.Format(expected) +
796
Environment.NewLine + "Actual: " + actualType +
ArgumentFormatter
.Format(actual);
872
Assert.Equal(message.Replace("$$ELLIPSIS$$",
ArgumentFormatter
.Ellipsis), ex.Message);
1026
Assert.Equal(message.Replace("$$ELLIPSIS$$",
ArgumentFormatter
.Ellipsis), ex.Message);
1330
$"Expected: [[\"a\"] = 1, [\"be\"] = 2, [\"c\"] = 3, [\"d\"] = 4, [\"e\"] = 5, {
ArgumentFormatter
.Ellipsis}]" + Environment.NewLine +
1331
$"Actual: [[\"a\"] = 1, [\"ba\"] = 2, [\"c\"] = 3, [\"d\"] = 4, [\"e\"] = 5, {
ArgumentFormatter
.Ellipsis}]",
1746
$"Expected: Not int[] [1, 2, 3, 4, 5, {
ArgumentFormatter
.Ellipsis}]" + Environment.NewLine +
1747
$"Actual: List<int> [1, 2, 3, 4, 5, {
ArgumentFormatter
.Ellipsis}]",
2330
$"Collection: [1, 2, 3, 4, 5, {
ArgumentFormatter
.Ellipsis}]",
2404
$"Collection: [1, 2, 3, 4, 5, {
ArgumentFormatter
.Ellipsis}]" + Environment.NewLine +
2465
$"Collection: [1, 2, 3, 4, 5, {
ArgumentFormatter
.Ellipsis}]",
2559
$"Collection: [1, 2, 3, 4, 5, {
ArgumentFormatter
.Ellipsis}]" + Environment.NewLine +
EqualityAssertsTests.cs (23)
1047
$"Expected: UnsafeEnumerable [{
ArgumentFormatter
.Ellipsis}]" + Environment.NewLine +
1711
$"Expected: [{
ArgumentFormatter
.Ellipsis}, 2, 3, 4, 5]" + Environment.NewLine +
1712
$"Actual: [{
ArgumentFormatter
.Ellipsis}, 2, 3, 4, 5, 6]" + Environment.NewLine +
1748
$"Expected: {
ArgumentFormatter
.Format(expected)}" + Environment.NewLine +
1749
$"Actual: {
ArgumentFormatter
.Format(actual)}",
1786
$"Expected: {
ArgumentFormatter
.Format(date1)}" + Environment.NewLine +
1787
$"Actual: {
ArgumentFormatter
.Format(date2)} (difference {difference} is larger than {precision})",
1797
$"Expected: {
ArgumentFormatter
.Format(date2)}" + Environment.NewLine +
1798
$"Actual: {
ArgumentFormatter
.Format(date1)} (difference {difference} is larger than {precision})",
1834
$"Expected: {
ArgumentFormatter
.Format(expected)}" + Environment.NewLine +
1835
$"Actual: {
ArgumentFormatter
.Format(actual)}",
1867
$"Expected: {
ArgumentFormatter
.Format(expected)}" + Environment.NewLine +
1868
$"Actual: {
ArgumentFormatter
.Format(actual)}",
1905
$"Expected: {
ArgumentFormatter
.Format(date1)}" + Environment.NewLine +
1906
$"Actual: {
ArgumentFormatter
.Format(date2)} (difference {difference} is larger than {precision})",
1916
$"Expected: {
ArgumentFormatter
.Format(date2)}" + Environment.NewLine +
1917
$"Actual: {
ArgumentFormatter
.Format(date1)} (difference {difference} is larger than {precision})",
1954
$"Expected: {
ArgumentFormatter
.Format(date1)}" + Environment.NewLine +
1955
$"Actual: {
ArgumentFormatter
.Format(date2)} (difference {difference} is larger than {precision})",
1965
$"Expected: {
ArgumentFormatter
.Format(date2)}" + Environment.NewLine +
1966
$"Actual: {
ArgumentFormatter
.Format(date1)} (difference {difference} is larger than {precision})",
4347
$"Expected: [{
ArgumentFormatter
.Ellipsis}]" + Environment.NewLine +
4348
$"Actual: [{
ArgumentFormatter
.Ellipsis}]",
MemoryAssertsTests.cs (20)
108
"String: \"This is a relatively long string so that \"" +
ArgumentFormatter
.Ellipsis + Environment.NewLine +
109
"Not found: \"We are looking for something very long as\"" +
ArgumentFormatter
.Ellipsis,
149
"Memory: [1, 2, 3, 4, 5, " +
ArgumentFormatter
.Ellipsis + "]" + Environment.NewLine +
163
"Memory: [1, 2, 3, 4, 5, " +
ArgumentFormatter
.Ellipsis + "]" + Environment.NewLine +
301
"String: \"Hello, world from a very long string that\"" +
ArgumentFormatter
.Ellipsis + Environment.NewLine +
316
"String: " +
ArgumentFormatter
.Ellipsis + "\"ng that has 'Hello, world' placed in the \"" +
ArgumentFormatter
.Ellipsis + Environment.NewLine +
331
"String: " +
ArgumentFormatter
.Ellipsis + "\"ont truncated, just to say 'Hello, world'\"" + Environment.NewLine +
373
"Memory: [1, 2, 3, 4, 5, " +
ArgumentFormatter
.Ellipsis + "]" + Environment.NewLine +
388
"Memory: [1, 2, 3, 4, 5, " +
ArgumentFormatter
.Ellipsis + "]" + Environment.NewLine +
516
"String: " +
ArgumentFormatter
.Ellipsis + "\"at we expected to find this ending inside\"" + Environment.NewLine +
517
"Expected end: \"This is a long string that we're looking \"" +
ArgumentFormatter
.Ellipsis,
631
Environment.NewLine + "Expected: " +
ArgumentFormatter
.Format(expected) +
632
Environment.NewLine + "Actual: " +
ArgumentFormatter
.Format(actual);
665
"Expected: " +
ArgumentFormatter
.Ellipsis + "\"hy hello there world, you're a long strin\"" +
ArgumentFormatter
.Ellipsis + Environment.NewLine +
666
"Actual: " +
ArgumentFormatter
.Ellipsis + "\"hy hello there world! You're a long strin\"" +
ArgumentFormatter
.Ellipsis + Environment.NewLine +
933
"String: \"This is the long string that we expected \"" +
ArgumentFormatter
.Ellipsis + Environment.NewLine +
934
"Expected start: \"This is a long string that we're looking \"" +
ArgumentFormatter
.Ellipsis,
Sdk\ArgumentFormatterTests.cs (34)
20
Assert.Equal("null",
ArgumentFormatter
.Format(null));
83
Assert.Equal(expected.Replace("$$ELLIPSIS$$",
ArgumentFormatter
.Ellipsis),
ArgumentFormatter
.Format(value));
124
Assert.Equal(expected,
ArgumentFormatter
.Format(value));
136
Assert.Equal(floatPI.ToString("G9"),
ArgumentFormatter
.Format(floatPI));
146
Assert.Equal(Math.PI.ToString("G17"),
ArgumentFormatter
.Format(Math.PI));
156
Assert.Equal(123.45M.ToString(),
ArgumentFormatter
.Format(123.45M));
168
Assert.Equal(now.ToString("o"),
ArgumentFormatter
.Format(now));
180
Assert.Equal(now.ToString("o"),
ArgumentFormatter
.Format(now));
189
Assert.Equal("Task { Status = RanToCompletion }",
ArgumentFormatter
.Format(task));
198
Assert.Equal("Task<int> { Status = Faulted }",
ArgumentFormatter
.Format(taskCompletionSource.Task));
227
Assert.Equal(expected,
ArgumentFormatter
.Format(type));
251
var actual =
ArgumentFormatter
.Format(enumValue);
278
var actual =
ArgumentFormatter
.Format(enumValue);
296
Assert.Equal(expected,
ArgumentFormatter
.Format(kvp));
319
Assert.Equal(expected,
ArgumentFormatter
.Format(collection));
336
Assert.Equal(expected,
ArgumentFormatter
.Format(value));
353
Assert.Equal($"[0, 1, 2, 3, 4, {
ArgumentFormatter
.Ellipsis}]",
ArgumentFormatter
.Format(collection));
367
Assert.Equal($"[42, [42, [{
ArgumentFormatter
.Ellipsis}]]]",
ArgumentFormatter
.Format(looping));
382
Assert.Equal(expected,
ArgumentFormatter
.Format(new MyComplexType()));
412
Assert.Equal(expected,
ArgumentFormatter
.Format(new MyComplexTypeWrapper()));
429
Assert.Equal("Object { }",
ArgumentFormatter
.Format(new object()));
439
Assert.Equal("ThrowingGetter { MyThrowingProperty = (throws NotImplementedException) }",
ArgumentFormatter
.Format(new ThrowingGetter()));
454
var expected = $@"Big {{ MyField1 = 42, MyField2 = ""Hello, world!"", MyProp1 = {21.12}, MyProp2 = typeof(ArgumentFormatterTests+ComplexTypes+Big), MyProp3 = 2014-04-17T07:45:23.0000000+00:00, {
ArgumentFormatter
.Ellipsis} }}";
456
Assert.Equal(expected,
ArgumentFormatter
.Format(new Big()));
489
Assert.Equal($"Looping {{ Me = Looping {{ Me = Looping {{ {
ArgumentFormatter
.Ellipsis} }} }} }}",
ArgumentFormatter
.Format(new Looping()));
502
Assert.Equal("This is what you should show",
ArgumentFormatter
.Format(new TypeWithToString()));
528
Assert.Equal(expectedResult,
ArgumentFormatter
.Format(type));
537
Assert.Equal("typeof(T)",
ArgumentFormatter
.Format(parameterType));
546
Assert.Equal("typeof(TKey)",
ArgumentFormatter
.Format(parameterTKey));
549
Assert.Equal("typeof(TValue)",
ArgumentFormatter
.Format(parameterTValue));
Sdk\CollectionTrackerTests.cs (21)
18
var result = tracker.FormatIndexedMismatch(2600, out var pointerIndent,
ArgumentFormatter
.MAX_DEPTH);
20
Assert.Equal($"[{
ArgumentFormatter
.Ellipsis}]", result);
44
Assert.Equal($"[1, 2, 3, 4, 5, {
ArgumentFormatter
.Ellipsis}]", result);
56
Assert.Equal($"[{
ArgumentFormatter
.Ellipsis}, 2, 3, 4, 5, 6, {
ArgumentFormatter
.Ellipsis}]", result);
68
Assert.Equal($"[{
ArgumentFormatter
.Ellipsis}, 3, 4, 5, 6, 7]", result);
82
var result = CollectionTracker<int>.FormatIndexedMismatch(span, 2600, out var pointerIndent,
ArgumentFormatter
.MAX_DEPTH);
84
Assert.Equal($"[{
ArgumentFormatter
.Ellipsis}]", result);
108
Assert.Equal($"[1, 2, 3, 4, 5, {
ArgumentFormatter
.Ellipsis}]", result);
120
Assert.Equal($"[{
ArgumentFormatter
.Ellipsis}, 2, 3, 4, 5, 6, {
ArgumentFormatter
.Ellipsis}]", result);
132
Assert.Equal($"[{
ArgumentFormatter
.Ellipsis}, 3, 4, 5, 6, 7]", result);
154
Assert.Equal($"[{
ArgumentFormatter
.Ellipsis}]", tracker.FormatStart(
ArgumentFormatter
.MAX_DEPTH));
178
Assert.Equal($"[1, {2.3M}, \"Hello, world!\", 42, 2112, {
ArgumentFormatter
.Ellipsis}]", tracker.FormatStart());
197
Assert.Equal($"[{
ArgumentFormatter
.Ellipsis}]", CollectionTracker<object>.FormatStart(collection,
ArgumentFormatter
.MAX_DEPTH));
221
Assert.Equal($"[1, {2.3M}, \"Hello, world!\", 42, 2112, {
ArgumentFormatter
.Ellipsis}]", CollectionTracker<object>.FormatStart(collection));
241
Assert.Equal($"[{
ArgumentFormatter
.Ellipsis}]", CollectionTracker<object>.FormatStart(span,
ArgumentFormatter
.MAX_DEPTH));
265
Assert.Equal($"[1, {2.3M}, \"Hello, world!\", 42, 2112, {
ArgumentFormatter
.Ellipsis}]", CollectionTracker<object>.FormatStart(span));
SpanAssertsTests.cs (20)
108
$"String: \"This is a relatively long string so that \"{
ArgumentFormatter
.Ellipsis}" + Environment.NewLine +
109
$"Not found: \"We are looking for something very long as\"{
ArgumentFormatter
.Ellipsis}",
149
$"Span: [1, 2, 3, 4, 5, {
ArgumentFormatter
.Ellipsis}]" + Environment.NewLine +
163
$"Span: [1, 2, 3, 4, 5, {
ArgumentFormatter
.Ellipsis}]" + Environment.NewLine +
301
$"String: \"Hello, world from a very long string that\"{
ArgumentFormatter
.Ellipsis}" + Environment.NewLine +
316
$"String: {
ArgumentFormatter
.Ellipsis}\"ng that has 'Hello, world' placed in the \"{
ArgumentFormatter
.Ellipsis}" + Environment.NewLine +
331
$"String: {
ArgumentFormatter
.Ellipsis}\"ont truncated, just to say 'Hello, world'\"" + Environment.NewLine +
373
$"Span: [1, 2, 3, 4, 5, {
ArgumentFormatter
.Ellipsis}]" + Environment.NewLine +
388
$"Span: [1, 2, 3, 4, 5, {
ArgumentFormatter
.Ellipsis}]" + Environment.NewLine +
516
"String: " +
ArgumentFormatter
.Ellipsis + "\"at we expected to find this ending inside\"" + Environment.NewLine +
517
"Expected end: \"This is a long string that we're looking \"" +
ArgumentFormatter
.Ellipsis,
631
Environment.NewLine + "Expected: " +
ArgumentFormatter
.Format(expected) +
632
Environment.NewLine + "Actual: " +
ArgumentFormatter
.Format(actual);
665
$"Expected: {
ArgumentFormatter
.Ellipsis}\"hy hello there world, you're a long strin\"{
ArgumentFormatter
.Ellipsis}" + Environment.NewLine +
666
$"Actual: {
ArgumentFormatter
.Ellipsis}\"hy hello there world! You're a long strin\"{
ArgumentFormatter
.Ellipsis}" + Environment.NewLine +
933
"String: \"This is the long string that we expected \"" +
ArgumentFormatter
.Ellipsis + Environment.NewLine +
934
"Expected start: \"This is a long string that we're looking \"" +
ArgumentFormatter
.Ellipsis,
StringAssertsTests.cs (16)
111
$"String: \"This is a relatively long string so that \"{
ArgumentFormatter
.Ellipsis}" + Environment.NewLine +
112
$"Not found: \"We are looking for something very long as\"{
ArgumentFormatter
.Ellipsis}",
228
$"String: \"Hello, world from a very long string that\"{
ArgumentFormatter
.Ellipsis}" + Environment.NewLine +
258
$"String: {
ArgumentFormatter
.Ellipsis}\"ng that has 'Hello, world' placed in the \"{
ArgumentFormatter
.Ellipsis}" + Environment.NewLine +
288
$"String: {
ArgumentFormatter
.Ellipsis}\"ont truncated, just to say 'Hello, world'\"" + Environment.NewLine +
545
"String: " +
ArgumentFormatter
.Ellipsis + "\"at we expected to find this ending inside\"" + Environment.NewLine +
546
"Expected end: \"This is a long string that we're looking \"" +
ArgumentFormatter
.Ellipsis,
673
Environment.NewLine + "Expected: " +
ArgumentFormatter
.Format(expected) +
674
Environment.NewLine + "Actual: " +
ArgumentFormatter
.Format(actual);
715
$"Expected: {
ArgumentFormatter
.Ellipsis}\"hy hello there world, you're a long strin\"{
ArgumentFormatter
.Ellipsis}" + Environment.NewLine +
716
$"Actual: {
ArgumentFormatter
.Ellipsis}\"hy hello there world! You're a long strin\"{
ArgumentFormatter
.Ellipsis}" + Environment.NewLine +
947
"String: \"This is the long string that we expected \"" +
ArgumentFormatter
.Ellipsis + Environment.NewLine +
948
"Expected start: \"This is a long string that we're looking \"" +
ArgumentFormatter
.Ellipsis,
xunit.assert (125)
CollectionAsserts.cs (6)
84
errors.Add(new Tuple<int, string, Exception>(idx,
ArgumentFormatter
.Format(item), ex));
138
errors.Add(new Tuple<int, string, Exception>(idx,
ArgumentFormatter
.Format(item), ex));
282
throw ContainsException.ForCollectionItemNotFound(
ArgumentFormatter
.Format(expected), tracker.FormatStart());
338
throw DistinctException.ForDuplicateItem(
ArgumentFormatter
.Format(item), tracker.FormatStart());
404
ArgumentFormatter
.Format(expected),
652
GetSingleResult(collection.Cast<object>(), item => object.Equals(item, expected),
ArgumentFormatter
.Format(expected));
DictionaryAsserts.cs (4)
62
ArgumentFormatter
.Format(expected),
96
ArgumentFormatter
.Format(expected),
219
ArgumentFormatter
.Format(expected),
245
ArgumentFormatter
.Format(expected),
EqualityAsserts.cs (20)
243
formattedExpected = expectedTracker?.FormatIndexedMismatch(expectedStartIdx, expectedEndIdx, mismatchedIndex, out expectedPointer) ??
ArgumentFormatter
.Format(expected);
247
formattedActual = actualTracker?.FormatIndexedMismatch(actualStartIdx, actualEndIdx, mismatchedIndex, out actualPointer) ??
ArgumentFormatter
.Format(actual);
262
formattedExpected =
ArgumentFormatter
.Format(expected);
263
formattedActual =
ArgumentFormatter
.Format(actual);
277
var expectedTypeName = expectedType == null ? "" : (AssertHelper.IsCompilerGenerated(expectedType) ? "<generated> " :
ArgumentFormatter
.FormatTypeName(expectedType) + " ");
278
var actualTypeName = actualType == null ? "" : (AssertHelper.IsCompilerGenerated(actualType) ? "<generated> " :
ArgumentFormatter
.FormatTypeName(actualType) + " ");
527
ArgumentFormatter
.Format(actual) +
561
ArgumentFormatter
.Format(actual) +
689
var formattedExpected =
ArgumentFormatter
.Format(expected);
690
var formattedActual =
ArgumentFormatter
.Format(actual);
758
formattedExpected = expectedTracker?.FormatIndexedMismatch(expectedStartIdx, expectedEndIdx, mismatchedIndex, out expectedPointer) ??
ArgumentFormatter
.Format(expected);
761
formattedActual = actualTracker?.FormatIndexedMismatch(actualStartIdx, actualEndIdx, mismatchedIndex, out actualPointer) ??
ArgumentFormatter
.Format(actual);
776
formattedExpected =
ArgumentFormatter
.Format(expected);
777
formattedActual =
ArgumentFormatter
.Format(actual);
791
var expectedTypeName = expectedType == null ? "" : (AssertHelper.IsCompilerGenerated(expectedType) ? "<generated> " :
ArgumentFormatter
.FormatTypeName(expectedType) + " ");
792
var actualTypeName = actualType == null ? "" : (AssertHelper.IsCompilerGenerated(actualType) ? "<generated> " :
ArgumentFormatter
.FormatTypeName(actualType) + " ");
1005
ArgumentFormatter
.Format(expected),
1006
ArgumentFormatter
.Format(actual)
1034
ArgumentFormatter
.Format(expected),
1035
ArgumentFormatter
.Format(actual)
IdentityAsserts.cs (2)
55
ArgumentFormatter
.Format(expected),
56
ArgumentFormatter
.Format(actual)
Sdk\AssertHelper.cs (4)
223
printedValue.Append(
ArgumentFormatter
.Ellipsis);
256
printedValue.Append(
ArgumentFormatter
.Ellipsis);
541
ArgumentFormatter
.FormatTypeName(expected.GetType()),
542
ArgumentFormatter
.FormatTypeName(actual.GetType())
Sdk\CollectionTracker.cs (37)
318
var elementTypeX =
ArgumentFormatter
.GetSetElementType(x.InnerEnumerable);
319
var elementTypeY =
ArgumentFormatter
.GetSetElementType(y.InnerEnumerable);
472
const int MAX_ENUMERABLE_LENGTH_HALF =
ArgumentFormatter
.MAX_ENUMERABLE_LENGTH / 2;
523
if (depth ==
ArgumentFormatter
.MAX_DEPTH)
526
return
ArgumentFormatter
.EllipsisInBrackets;
586
if (depth ==
ArgumentFormatter
.MAX_DEPTH)
589
return
ArgumentFormatter
.EllipsisInBrackets;
593
var endIndex = Math.Min(span.Length - 1, startIndex +
ArgumentFormatter
.MAX_ENUMERABLE_LENGTH - 1);
594
startIndex = Math.Max(0, endIndex -
ArgumentFormatter
.MAX_ENUMERABLE_LENGTH + 1);
627
printedValues.Append(
ArgumentFormatter
.Ellipsis + ", ");
637
printedValues.Append(
ArgumentFormatter
.Format(items[idx], depth));
641
printedValues.Append(", " +
ArgumentFormatter
.Ellipsis);
650
if (depth ==
ArgumentFormatter
.MAX_DEPTH)
651
return
ArgumentFormatter
.EllipsisInBrackets;
657
while (enumerator.CurrentIndex <=
ArgumentFormatter
.MAX_ENUMERABLE_LENGTH)
676
if (depth ==
ArgumentFormatter
.MAX_DEPTH)
677
return
ArgumentFormatter
.EllipsisInBrackets;
684
while (currentIndex <=
ArgumentFormatter
.MAX_ENUMERABLE_LENGTH)
707
if (depth ==
ArgumentFormatter
.MAX_DEPTH)
708
return
ArgumentFormatter
.EllipsisInBrackets;
715
while (currentIndex <=
ArgumentFormatter
.MAX_ENUMERABLE_LENGTH)
734
var printLength = Math.Min(currentIndex + 1,
ArgumentFormatter
.MAX_ENUMERABLE_LENGTH);
741
printedValues.Append(
ArgumentFormatter
.Format(items[idx], depth));
744
if (currentIndex >=
ArgumentFormatter
.MAX_ENUMERABLE_LENGTH)
745
printedValues.Append(", " +
ArgumentFormatter
.Ellipsis);
778
endIndex = startIndex +
ArgumentFormatter
.MAX_ENUMERABLE_LENGTH - 1;
786
startIndex = Math.Max(0, endIndex -
ArgumentFormatter
.MAX_ENUMERABLE_LENGTH + 1);
820
readonly T[] currentItemsRingBuffer = new T[
ArgumentFormatter
.MAX_ENUMERABLE_LENGTH];
848
var itemIndex = Math.Max(0, CurrentIndex -
ArgumentFormatter
.MAX_ENUMERABLE_LENGTH + 1);
850
var indexInRingBuffer = (currentItemsLastInsertionIndex - CurrentIndex + itemIndex) %
ArgumentFormatter
.MAX_ENUMERABLE_LENGTH;
852
indexInRingBuffer +=
ArgumentFormatter
.MAX_ENUMERABLE_LENGTH;
859
indexInRingBuffer = (indexInRingBuffer + 1) %
ArgumentFormatter
.MAX_ENUMERABLE_LENGTH;
885
if (CurrentIndex <=
ArgumentFormatter
.MAX_ENUMERABLE_LENGTH)
890
currentItemsLastInsertionIndex = (currentItemsLastInsertionIndex + 1) %
ArgumentFormatter
.MAX_ENUMERABLE_LENGTH;
915
if (index < 0 || index <= CurrentIndex -
ArgumentFormatter
.MAX_ENUMERABLE_LENGTH || index > CurrentIndex)
918
var indexInRingBuffer = (currentItemsLastInsertionIndex - CurrentIndex + index) %
ArgumentFormatter
.MAX_ENUMERABLE_LENGTH;
920
indexInRingBuffer +=
ArgumentFormatter
.MAX_ENUMERABLE_LENGTH;
Sdk\Exceptions\EqualException.cs (3)
111
error =
ArgumentFormatter
.UnwrapException(error);
225
var expectedText = expected as string ??
ArgumentFormatter
.Format(expected);
226
var actualText = actual as string ??
ArgumentFormatter
.Format(actual);
Sdk\Exceptions\EquivalentException.cs (11)
104
ArgumentFormatter
.Format(expected),
106
ArgumentFormatter
.Format(actual)
163
ArgumentFormatter
.Format(expected),
165
ArgumentFormatter
.Format(actual)
193
ArgumentFormatter
.Format(expected),
195
ArgumentFormatter
.Format(actual)
228
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(expected), expected)),
230
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(actualLeftovers), actualLeftovers)),
231
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(actual), actual))
256
ArgumentFormatter
.FormatTypeName(Assert.GuardArgumentNotNull(nameof(expectedType), expectedType), fullTypeName: true),
258
ArgumentFormatter
.FormatTypeName(Assert.GuardArgumentNotNull(nameof(actualType), actualType), fullTypeName: true)
Sdk\Exceptions\InRangeException.cs (3)
45
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(low), low)),
46
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(high), high)),
48
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(actual), actual))
Sdk\Exceptions\IsAssignableFromException.cs (2)
51
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(expected), expected)),
53
ArgumentFormatter
.Format(actual?.GetType())
Sdk\Exceptions\IsNotAssignableFromException.cs (2)
43
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(expected), expected)),
45
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(actual), actual).GetType())
Sdk\Exceptions\IsNotTypeException.cs (1)
39
var formattedType =
ArgumentFormatter
.Format(type);
Sdk\Exceptions\MatchesException.cs (2)
47
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(expectedRegexPattern), expectedRegexPattern)),
49
ArgumentFormatter
.Format(actual)
Sdk\Exceptions\NotEqualException.cs (1)
88
error =
ArgumentFormatter
.UnwrapException(error);
Sdk\Exceptions\NotInRangeException.cs (3)
45
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(low), low)),
46
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(high), high)),
48
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(actual), actual))
Sdk\Exceptions\NotNullException.cs (1)
39
ArgumentFormatter
.FormatTypeName(Assert.GuardArgumentNotNull(nameof(type), type))
Sdk\Exceptions\NullException.cs (3)
52
ArgumentFormatter
.FormatTypeName(Assert.GuardArgumentNotNull(nameof(type), type)),
55
ArgumentFormatter
.Format(actual)
78
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(actual), actual))
Sdk\Exceptions\RaisesAnyException.cs (1)
40
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(expected), expected)),
Sdk\Exceptions\RaisesException.cs (3)
43
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(expected), expected)),
45
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(actual), actual))
67
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(expected), expected)),
Sdk\Exceptions\ThrowsAnyException.cs (3)
52
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(expected), expected)),
54
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(actual), actual).GetType())
70
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(expected), expected))
Sdk\Exceptions\ThrowsException.cs (6)
52
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(expected), expected)),
54
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(actual), actual).GetType())
80
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(expected), expected)),
82
ArgumentFormatter
.Format(expectedParamName),
84
ArgumentFormatter
.Format(actualParamName)
99
ArgumentFormatter
.Format(Assert.GuardArgumentNotNull(nameof(expected), expected))
SetAsserts.cs (4)
45
ArgumentFormatter
.Format(expected),
72
ArgumentFormatter
.Format(expected),
143
ArgumentFormatter
.Format(expected),
169
ArgumentFormatter
.Format(expected),
TypeAsserts.cs (3)
176
throw IsTypeException.ForMismatchedType(
ArgumentFormatter
.Format(expectedType), null);
181
var expectedTypeName =
ArgumentFormatter
.Format(expectedType);
182
var actualTypeName =
ArgumentFormatter
.Format(actualType);