213 references to Spanify
Microsoft.DotNet.XUnitAssert.Tests (213)
Asserts\SpanAssertsTests.cs (77)
19 Assert.Contains("wor".Spanify(), "Hello, world!".Spanify()); 39 var ex = Record.Exception(() => Assert.Contains("WORLD".Spanify(), "Hello, world!".Spanify())); 59 Assert.Contains("WORLD".Spanify(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase); 79 var ex = Record.Exception(() => Assert.Contains("foo".Spanify(), default(string).Spanify())); 95 "We are looking for something very long as well".Spanify(), 96 "This is a relatively long string so that we can see the truncation in action".Spanify() 200 Assert.DoesNotContain("hey".Spanify(), "Hello, world!".Spanify()); 212 Assert.DoesNotContain("WORLD".Spanify(), "Hello, world!".Spanify()); 233 var ex = Record.Exception(() => Assert.DoesNotContain("WORLD".Spanify(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase)); 263 var ex = Record.Exception(() => Assert.DoesNotContain("world".Spanify(), "Hello, world!".Spanify())); 284 Assert.DoesNotContain("foo".Spanify(), default(string).AsSpan()); 420 Assert.EndsWith("world!".AsSpan(), "Hello, world!".Spanify()); 421 Assert.EndsWith("world!".Spanify(), "Hello, world!".AsSpan()); 422 Assert.EndsWith("world!".Spanify(), "Hello, world!".Spanify()); 442 assertFailure(() => Assert.EndsWith("hey".AsSpan(), "Hello, world!".Spanify())); 443 assertFailure(() => Assert.EndsWith("hey".Spanify(), "Hello, world!".AsSpan())); 444 assertFailure(() => Assert.EndsWith("hey".Spanify(), "Hello, world!".Spanify())); 464 assertFailure(() => Assert.EndsWith("WORLD!".AsSpan(), "world!".Spanify())); 465 assertFailure(() => Assert.EndsWith("WORLD!".Spanify(), "world!".AsSpan())); 466 assertFailure(() => Assert.EndsWith("WORLD!".Spanify(), "world!".Spanify())); 473 Assert.EndsWith("WORLD!".AsSpan(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase); 474 Assert.EndsWith("WORLD!".Spanify(), "Hello, world!".AsSpan(), StringComparison.OrdinalIgnoreCase); 475 Assert.EndsWith("WORLD!".Spanify(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase); 495 assertFailure(() => Assert.EndsWith("foo".Spanify(), null)); 518 assertFailure(() => Assert.EndsWith(expected.AsSpan(), actual.Spanify())); 519 assertFailure(() => Assert.EndsWith(expected.Spanify(), actual.AsSpan())); 520 assertFailure(() => Assert.EndsWith(expected.Spanify(), actual.Spanify())); 583 Assert.Equal(value1.AsSpan(), value2.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 584 Assert.Equal(value2.AsSpan(), value1.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 587 Assert.Equal(value1.Spanify(), value2.AsSpan(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 588 Assert.Equal(value2.Spanify(), value1.AsSpan(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 591 Assert.Equal(value1.Spanify(), value2.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 592 Assert.Equal(value2.Spanify(), value1.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 644 assertFailure(() => Assert.Equal(expected.Spanify(), actual.AsSpan(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace)); 645 assertFailure(() => Assert.Equal(expected.AsSpan(), actual.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace)); 646 assertFailure(() => Assert.Equal(expected.Spanify(), actual.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace)); 676 "Why hello there world! You're a long string!".Spanify() 681 "Why hello there world, you're a long string with some truncation!".Spanify(), 687 "Why hello there world, you're a long string with some truncation!".Spanify(), 688 "Why hello there world! You're a long string!".Spanify() 845 Assert.StartsWith("Hello".AsSpan(), "Hello, world!".Spanify()); 846 Assert.StartsWith("Hello".Spanify(), "Hello, world!".AsSpan()); 847 Assert.StartsWith("Hello".Spanify(), "Hello, world!".Spanify()); 867 assertFailure(() => Assert.StartsWith("hey".AsSpan(), "Hello, world!".Spanify())); 868 assertFailure(() => Assert.StartsWith("hey".Spanify(), "Hello, world!".AsSpan())); 869 assertFailure(() => Assert.StartsWith("hey".Spanify(), "Hello, world!".Spanify())); 889 assertFailure(() => Assert.StartsWith("WORLD!".AsSpan(), "world!".Spanify())); 890 assertFailure(() => Assert.StartsWith("WORLD!".Spanify(), "world!".AsSpan())); 891 assertFailure(() => Assert.StartsWith("WORLD!".Spanify(), "world!".Spanify())); 898 Assert.StartsWith("HELLO".AsSpan(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase); 899 Assert.StartsWith("HELLO".Spanify(), "Hello, world!".AsSpan(), StringComparison.OrdinalIgnoreCase); 900 Assert.StartsWith("HELLO".Spanify(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase); 920 assertFailure(() => Assert.StartsWith("foo".Spanify(), null)); 943 assertFailure(() => Assert.StartsWith(expected.AsSpan(), actual.Spanify())); 944 assertFailure(() => Assert.StartsWith(expected.Spanify(), actual.AsSpan())); 945 assertFailure(() => Assert.StartsWith(expected.Spanify(), actual.Spanify()));
Asserts\StringAssertsTests.cs (136)
19 Assert.Contains("wor".Spanify(), "Hello, world!".Spanify()); 20 Assert.Contains("wor".AsSpan(), "Hello, world!".Spanify()); 21 Assert.Contains("wor".Spanify(), "Hello, world!".AsSpan()); 46 verify(() => Assert.Contains("WORLD".Spanify(), "Hello, world!".Spanify())); 47 verify(() => Assert.Contains("WORLD".AsSpan(), "Hello, world!".Spanify())); 48 verify(() => Assert.Contains("WORLD".Spanify(), "Hello, world!".AsSpan())); 73 verify(() => Assert.Contains("hey".Spanify(), "Hello, world!".Spanify())); 74 verify(() => Assert.Contains("hey".AsSpan(), "Hello, world!".Spanify())); 75 verify(() => Assert.Contains("hey".Spanify(), "Hello, world!".AsSpan())); 117 verify(() => Assert.Contains(expected.Spanify(), actual.Spanify())); 118 verify(() => Assert.Contains(expected.AsSpan(), actual.Spanify())); 119 verify(() => Assert.Contains(expected.Spanify(), actual.AsSpan())); 131 Assert.Contains("WORLD".Spanify(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase); 132 Assert.Contains("WORLD".AsSpan(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase); 133 Assert.Contains("WORLD".Spanify(), "Hello, world!".AsSpan(), StringComparison.OrdinalIgnoreCase); 148 Assert.DoesNotContain("hey".Spanify(), "Hello, world!".Spanify()); 149 Assert.DoesNotContain("hey".AsSpan(), "Hello, world!".Spanify()); 150 Assert.DoesNotContain("hey".Spanify(), "Hello, world!".AsSpan()); 162 Assert.DoesNotContain("WORLD".Spanify(), "Hello, world!".Spanify()); 163 Assert.DoesNotContain("WORLD".AsSpan(), "Hello, world!".Spanify()); 164 Assert.DoesNotContain("WORLD".Spanify(), "Hello, world!".AsSpan()); 190 verify(() => Assert.DoesNotContain("world".Spanify(), "Hello, world!".Spanify())); 191 verify(() => Assert.DoesNotContain("world".AsSpan(), "Hello, world!".Spanify())); 192 verify(() => Assert.DoesNotContain("world".Spanify(), "Hello, world!".AsSpan())); 224 verify(() => Assert.DoesNotContain("world".Spanify(), "Hello, world from a very long string that will end up being truncated".Spanify())); 225 verify(() => Assert.DoesNotContain("world".AsSpan(), "Hello, world from a very long string that will end up being truncated".Spanify())); 226 verify(() => Assert.DoesNotContain("world".Spanify(), "Hello, world from a very long string that will end up being truncated".AsSpan())); 252 verify(() => Assert.DoesNotContain("world".Spanify(), "This is a relatively long string that has 'Hello, world' placed in the middle so that we can dual trunaction".Spanify())); 253 verify(() => Assert.DoesNotContain("world".AsSpan(), "This is a relatively long string that has 'Hello, world' placed in the middle so that we can dual trunaction".Spanify())); 254 verify(() => Assert.DoesNotContain("world".Spanify(), "This is a relatively long string that has 'Hello, world' placed in the middle so that we can dual trunaction".AsSpan())); 280 verify(() => Assert.DoesNotContain("world".Spanify(), "This is a relatively long string that will from the front truncated, just to say 'Hello, world'".Spanify())); 281 verify(() => Assert.DoesNotContain("world".AsSpan(), "This is a relatively long string that will from the front truncated, just to say 'Hello, world'".Spanify())); 282 verify(() => Assert.DoesNotContain("world".Spanify(), "This is a relatively long string that will from the front truncated, just to say 'Hello, world'".AsSpan())); 308 verify(() => Assert.DoesNotContain("WORLD".Spanify(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase)); 309 verify(() => Assert.DoesNotContain("WORLD".AsSpan(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase)); 310 verify(() => Assert.DoesNotContain("WORLD".Spanify(), "Hello, world!".AsSpan(), StringComparison.OrdinalIgnoreCase)); 413 Assert.EndsWith("world!".Spanify(), "Hello, world!".Spanify()); 414 Assert.EndsWith("world!".AsSpan(), "Hello, world!".Spanify()); 415 Assert.EndsWith("world!".Spanify(), "Hello, world!".AsSpan()); 440 verify(() => Assert.EndsWith("hey".Spanify(), "Hello, world!".Spanify())); 441 verify(() => Assert.EndsWith("hey".AsSpan(), "Hello, world!".Spanify())); 442 verify(() => Assert.EndsWith("hey".Spanify(), "Hello, world!".AsSpan())); 467 verify(() => Assert.EndsWith("WORLD!".Spanify(), "world!".Spanify())); 468 verify(() => Assert.EndsWith("WORLD!".AsSpan(), "world!".Spanify())); 469 verify(() => Assert.EndsWith("WORLD!".Spanify(), "world!".AsSpan())); 481 Assert.EndsWith("WORLD!".Spanify(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase); 482 Assert.EndsWith("WORLD!".AsSpan(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase); 483 Assert.EndsWith("WORLD!".Spanify(), "Hello, world!".AsSpan(), StringComparison.OrdinalIgnoreCase); 525 verify(() => Assert.EndsWith(expected.Spanify(), actual.Spanify())); 526 verify(() => Assert.EndsWith(expected.AsSpan(), actual.Spanify())); 527 verify(() => Assert.EndsWith(expected.Spanify(), actual.AsSpan())); 590 Assert.Equal(value1.Spanify(), value2.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 591 Assert.Equal(value2.Spanify(), value1.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 592 Assert.Equal(value1.AsSpan(), value2.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 593 Assert.Equal(value2.AsSpan(), value1.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 594 Assert.Equal(value1.Spanify(), value2.AsSpan(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 595 Assert.Equal(value2.Spanify(), value1.AsSpan(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 655 verify(() => Assert.Equal(expected.Spanify(), actual.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace)); 656 verify(() => Assert.Equal(expected.AsSpan(), actual.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace)); 657 verify(() => Assert.Equal(expected.Spanify(), actual.AsSpan(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace)); 688 verify(() => Assert.Equal(expected.Spanify(), actual.Spanify())); 689 verify(() => Assert.Equal(expected.AsSpan(), actual.Spanify())); 690 verify(() => Assert.Equal(expected.Spanify(), actual.AsSpan())); 719 verify(() => Assert.Equal(expected.Spanify(), actual.Spanify())); 720 verify(() => Assert.Equal(expected.AsSpan(), actual.Spanify())); 721 verify(() => Assert.Equal(expected.Spanify(), actual.AsSpan())); 750 verify(() => Assert.Equal(expected.Spanify(), actual.Spanify(), ignoreWhiteSpaceDifferences: true)); 751 verify(() => Assert.Equal(expected.AsSpan(), actual.Spanify(), ignoreWhiteSpaceDifferences: true)); 752 verify(() => Assert.Equal(expected.Spanify(), actual.AsSpan(), ignoreWhiteSpaceDifferences: true)); 781 verify(() => Assert.Equal(expected.Spanify(), actual.Spanify())); 782 verify(() => Assert.Equal(expected.AsSpan(), actual.Spanify())); 783 verify(() => Assert.Equal(expected.Spanify(), actual.AsSpan())); 812 verify(() => Assert.Equal(expected.Spanify(), actual.Spanify(), ignoreWhiteSpaceDifferences: true)); 813 verify(() => Assert.Equal(expected.AsSpan(), actual.Spanify(), ignoreWhiteSpaceDifferences: true)); 814 verify(() => Assert.Equal(expected.Spanify(), actual.AsSpan(), ignoreWhiteSpaceDifferences: true)); 844 verify(() => Assert.Equal(expected.Spanify(), actual.Spanify())); 845 verify(() => Assert.Equal(expected.AsSpan(), actual.Spanify())); 846 verify(() => Assert.Equal(expected.Spanify(), actual.AsSpan())); 876 verify(() => Assert.Equal(expected.Spanify(), actual.Spanify(), ignoreWhiteSpaceDifferences: true)); 877 verify(() => Assert.Equal(expected.AsSpan(), actual.Spanify(), ignoreWhiteSpaceDifferences: true)); 878 verify(() => Assert.Equal(expected.Spanify(), actual.AsSpan(), ignoreWhiteSpaceDifferences: true)); 908 verify(() => Assert.Equal(expected.Spanify(), actual.Spanify())); 909 verify(() => Assert.Equal(expected.AsSpan(), actual.Spanify())); 910 verify(() => Assert.Equal(expected.Spanify(), actual.AsSpan())); 940 verify(() => Assert.Equal(expected.Spanify(), actual.Spanify(), ignoreWhiteSpaceDifferences: true)); 941 verify(() => Assert.Equal(expected.AsSpan(), actual.Spanify(), ignoreWhiteSpaceDifferences: true)); 942 verify(() => Assert.Equal(expected.Spanify(), actual.AsSpan(), ignoreWhiteSpaceDifferences: true)); 1049 Assert.StartsWith("Hello".Spanify(), "Hello, world!".Spanify()); 1050 Assert.StartsWith("Hello".AsSpan(), "Hello, world!".Spanify()); 1051 Assert.StartsWith("Hello".Spanify(), "Hello, world!".AsSpan()); 1076 verify(() => Assert.StartsWith("hey".Spanify(), "Hello, world!".Spanify())); 1077 verify(() => Assert.StartsWith("hey".AsSpan(), "Hello, world!".Spanify())); 1078 verify(() => Assert.StartsWith("hey".Spanify(), "Hello, world!".AsSpan())); 1103 verify(() => Assert.StartsWith("WORLD!".Spanify(), "world!".Spanify())); 1104 verify(() => Assert.StartsWith("WORLD!".AsSpan(), "world!".Spanify())); 1105 verify(() => Assert.StartsWith("WORLD!".Spanify(), "world!".AsSpan())); 1117 Assert.StartsWith("HELLO".Spanify(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase); 1118 Assert.StartsWith("HELLO".AsSpan(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase); 1119 Assert.StartsWith("HELLO".Spanify(), "Hello, world!".AsSpan(), StringComparison.OrdinalIgnoreCase); 1161 verify(() => Assert.StartsWith(expected.Spanify(), actual.Spanify())); 1162 verify(() => Assert.StartsWith(expected.AsSpan(), actual.Spanify())); 1163 verify(() => Assert.StartsWith(expected.Spanify(), actual.AsSpan()));