181 references to Spanify
Microsoft.DotNet.XUnitAssert.Tests (181)
SpanAssertsTests.cs (77)
24 Assert.Contains("wor".Spanify(), "Hello, world!".Spanify()); 44 var ex = Record.Exception(() => Assert.Contains("WORLD".Spanify(), "Hello, world!".Spanify())); 64 Assert.Contains("WORLD".Spanify(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase); 84 var ex = Record.Exception(() => Assert.Contains("foo".Spanify(), default(string).Spanify())); 100 "We are looking for something very long as well".Spanify(), 101 "This is a relatively long string so that we can see the truncation in action".Spanify() 205 Assert.DoesNotContain("hey".Spanify(), "Hello, world!".Spanify()); 217 Assert.DoesNotContain("WORLD".Spanify(), "Hello, world!".Spanify()); 238 var ex = Record.Exception(() => Assert.DoesNotContain("WORLD".Spanify(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase)); 268 var ex = Record.Exception(() => Assert.DoesNotContain("world".Spanify(), "Hello, world!".Spanify())); 289 Assert.DoesNotContain("foo".Spanify(), default(string).AsSpan()); 425 Assert.EndsWith("world!".AsSpan(), "Hello, world!".Spanify()); 426 Assert.EndsWith("world!".Spanify(), "Hello, world!".AsSpan()); 427 Assert.EndsWith("world!".Spanify(), "Hello, world!".Spanify()); 447 assertFailure(() => Assert.EndsWith("hey".AsSpan(), "Hello, world!".Spanify())); 448 assertFailure(() => Assert.EndsWith("hey".Spanify(), "Hello, world!".AsSpan())); 449 assertFailure(() => Assert.EndsWith("hey".Spanify(), "Hello, world!".Spanify())); 469 assertFailure(() => Assert.EndsWith("WORLD!".AsSpan(), "world!".Spanify())); 470 assertFailure(() => Assert.EndsWith("WORLD!".Spanify(), "world!".AsSpan())); 471 assertFailure(() => Assert.EndsWith("WORLD!".Spanify(), "world!".Spanify())); 478 Assert.EndsWith("WORLD!".AsSpan(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase); 479 Assert.EndsWith("WORLD!".Spanify(), "Hello, world!".AsSpan(), StringComparison.OrdinalIgnoreCase); 480 Assert.EndsWith("WORLD!".Spanify(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase); 500 assertFailure(() => Assert.EndsWith("foo".Spanify(), null)); 523 assertFailure(() => Assert.EndsWith(expected.AsSpan(), actual.Spanify())); 524 assertFailure(() => Assert.EndsWith(expected.Spanify(), actual.AsSpan())); 525 assertFailure(() => Assert.EndsWith(expected.Spanify(), actual.Spanify())); 588 Assert.Equal(value1.AsSpan(), value2.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 589 Assert.Equal(value2.AsSpan(), value1.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 592 Assert.Equal(value1.Spanify(), value2.AsSpan(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 593 Assert.Equal(value2.Spanify(), value1.AsSpan(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 596 Assert.Equal(value1.Spanify(), value2.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 597 Assert.Equal(value2.Spanify(), value1.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 649 assertFailure(() => Assert.Equal(expected.Spanify(), actual.AsSpan(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace)); 650 assertFailure(() => Assert.Equal(expected.AsSpan(), actual.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace)); 651 assertFailure(() => Assert.Equal(expected.Spanify(), actual.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace)); 681 "Why hello there world! You're a long string!".Spanify() 686 "Why hello there world, you're a long string with some truncation!".Spanify(), 692 "Why hello there world, you're a long string with some truncation!".Spanify(), 693 "Why hello there world! You're a long string!".Spanify() 842 Assert.StartsWith("Hello".AsSpan(), "Hello, world!".Spanify()); 843 Assert.StartsWith("Hello".Spanify(), "Hello, world!".AsSpan()); 844 Assert.StartsWith("Hello".Spanify(), "Hello, world!".Spanify()); 864 assertFailure(() => Assert.StartsWith("hey".AsSpan(), "Hello, world!".Spanify())); 865 assertFailure(() => Assert.StartsWith("hey".Spanify(), "Hello, world!".AsSpan())); 866 assertFailure(() => Assert.StartsWith("hey".Spanify(), "Hello, world!".Spanify())); 886 assertFailure(() => Assert.StartsWith("WORLD!".AsSpan(), "world!".Spanify())); 887 assertFailure(() => Assert.StartsWith("WORLD!".Spanify(), "world!".AsSpan())); 888 assertFailure(() => Assert.StartsWith("WORLD!".Spanify(), "world!".Spanify())); 895 Assert.StartsWith("HELLO".AsSpan(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase); 896 Assert.StartsWith("HELLO".Spanify(), "Hello, world!".AsSpan(), StringComparison.OrdinalIgnoreCase); 897 Assert.StartsWith("HELLO".Spanify(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase); 917 assertFailure(() => Assert.StartsWith("foo".Spanify(), null)); 940 assertFailure(() => Assert.StartsWith(expected.AsSpan(), actual.Spanify())); 941 assertFailure(() => Assert.StartsWith(expected.Spanify(), actual.AsSpan())); 942 assertFailure(() => Assert.StartsWith(expected.Spanify(), actual.Spanify()));
StringAssertsTests.cs (104)
19 Assert.Contains("wor".Spanify(), "Hello, world!".Spanify()); 20 Assert.Contains("wor".AsSpan(), "Hello, world!".Spanify()); 21 Assert.Contains("wor".Spanify(), "Hello, world!".AsSpan()); 48 verify(() => Assert.Contains("WORLD".Spanify(), "Hello, world!".Spanify())); 49 verify(() => Assert.Contains("WORLD".AsSpan(), "Hello, world!".Spanify())); 50 verify(() => Assert.Contains("WORLD".Spanify(), "Hello, world!".AsSpan())); 77 verify(() => Assert.Contains("hey".Spanify(), "Hello, world!".Spanify())); 78 verify(() => Assert.Contains("hey".AsSpan(), "Hello, world!".Spanify())); 79 verify(() => Assert.Contains("hey".Spanify(), "Hello, world!".AsSpan())); 123 verify(() => Assert.Contains(expected.Spanify(), actual.Spanify())); 124 verify(() => Assert.Contains(expected.AsSpan(), actual.Spanify())); 125 verify(() => Assert.Contains(expected.Spanify(), actual.AsSpan())); 139 Assert.Contains("WORLD".Spanify(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase); 140 Assert.Contains("WORLD".AsSpan(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase); 141 Assert.Contains("WORLD".Spanify(), "Hello, world!".AsSpan(), StringComparison.OrdinalIgnoreCase); 158 Assert.DoesNotContain("hey".Spanify(), "Hello, world!".Spanify()); 159 Assert.DoesNotContain("hey".AsSpan(), "Hello, world!".Spanify()); 160 Assert.DoesNotContain("hey".Spanify(), "Hello, world!".AsSpan()); 174 Assert.DoesNotContain("WORLD".Spanify(), "Hello, world!".Spanify()); 175 Assert.DoesNotContain("WORLD".AsSpan(), "Hello, world!".Spanify()); 176 Assert.DoesNotContain("WORLD".Spanify(), "Hello, world!".AsSpan()); 204 verify(() => Assert.DoesNotContain("world".Spanify(), "Hello, world!".Spanify())); 205 verify(() => Assert.DoesNotContain("world".AsSpan(), "Hello, world!".Spanify())); 206 verify(() => Assert.DoesNotContain("world".Spanify(), "Hello, world!".AsSpan())); 240 verify(() => Assert.DoesNotContain("world".Spanify(), "Hello, world from a very long string that will end up being truncated".Spanify())); 241 verify(() => Assert.DoesNotContain("world".AsSpan(), "Hello, world from a very long string that will end up being truncated".Spanify())); 242 verify(() => Assert.DoesNotContain("world".Spanify(), "Hello, world from a very long string that will end up being truncated".AsSpan())); 270 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())); 271 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())); 272 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())); 300 verify(() => Assert.DoesNotContain("world".Spanify(), "This is a relatively long string that will from the front truncated, just to say 'Hello, world'".Spanify())); 301 verify(() => Assert.DoesNotContain("world".AsSpan(), "This is a relatively long string that will from the front truncated, just to say 'Hello, world'".Spanify())); 302 verify(() => Assert.DoesNotContain("world".Spanify(), "This is a relatively long string that will from the front truncated, just to say 'Hello, world'".AsSpan())); 330 verify(() => Assert.DoesNotContain("WORLD".Spanify(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase)); 331 verify(() => Assert.DoesNotContain("WORLD".AsSpan(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase)); 332 verify(() => Assert.DoesNotContain("WORLD".Spanify(), "Hello, world!".AsSpan(), StringComparison.OrdinalIgnoreCase)); 437 Assert.EndsWith("world!".Spanify(), "Hello, world!".Spanify()); 438 Assert.EndsWith("world!".AsSpan(), "Hello, world!".Spanify()); 439 Assert.EndsWith("world!".Spanify(), "Hello, world!".AsSpan()); 466 verify(() => Assert.EndsWith("hey".Spanify(), "Hello, world!".Spanify())); 467 verify(() => Assert.EndsWith("hey".AsSpan(), "Hello, world!".Spanify())); 468 verify(() => Assert.EndsWith("hey".Spanify(), "Hello, world!".AsSpan())); 495 verify(() => Assert.EndsWith("WORLD!".Spanify(), "world!".Spanify())); 496 verify(() => Assert.EndsWith("WORLD!".AsSpan(), "world!".Spanify())); 497 verify(() => Assert.EndsWith("WORLD!".Spanify(), "world!".AsSpan())); 511 Assert.EndsWith("WORLD!".Spanify(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase); 512 Assert.EndsWith("WORLD!".AsSpan(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase); 513 Assert.EndsWith("WORLD!".Spanify(), "Hello, world!".AsSpan(), StringComparison.OrdinalIgnoreCase); 557 verify(() => Assert.EndsWith(expected.Spanify(), actual.Spanify())); 558 verify(() => Assert.EndsWith(expected.AsSpan(), actual.Spanify())); 559 verify(() => Assert.EndsWith(expected.Spanify(), actual.AsSpan())); 626 Assert.Equal(value1.Spanify(), value2.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 627 Assert.Equal(value2.Spanify(), value1.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 628 Assert.Equal(value1.AsSpan(), value2.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 629 Assert.Equal(value2.AsSpan(), value1.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 630 Assert.Equal(value1.Spanify(), value2.AsSpan(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 631 Assert.Equal(value2.Spanify(), value1.AsSpan(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 693 verify(() => Assert.Equal(expected.Spanify(), actual.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace)); 694 verify(() => Assert.Equal(expected.AsSpan(), actual.Spanify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace)); 695 verify(() => Assert.Equal(expected.Spanify(), actual.AsSpan(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace)); 728 verify(() => Assert.Equal(expected.Spanify(), actual.Spanify())); 729 verify(() => Assert.Equal(expected.AsSpan(), actual.Spanify())); 730 verify(() => Assert.Equal(expected.Spanify(), actual.AsSpan())); 839 Assert.StartsWith("Hello".Spanify(), "Hello, world!".Spanify()); 840 Assert.StartsWith("Hello".AsSpan(), "Hello, world!".Spanify()); 841 Assert.StartsWith("Hello".Spanify(), "Hello, world!".AsSpan()); 868 verify(() => Assert.StartsWith("hey".Spanify(), "Hello, world!".Spanify())); 869 verify(() => Assert.StartsWith("hey".AsSpan(), "Hello, world!".Spanify())); 870 verify(() => Assert.StartsWith("hey".Spanify(), "Hello, world!".AsSpan())); 897 verify(() => Assert.StartsWith("WORLD!".Spanify(), "world!".Spanify())); 898 verify(() => Assert.StartsWith("WORLD!".AsSpan(), "world!".Spanify())); 899 verify(() => Assert.StartsWith("WORLD!".Spanify(), "world!".AsSpan())); 913 Assert.StartsWith("HELLO".Spanify(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase); 914 Assert.StartsWith("HELLO".AsSpan(), "Hello, world!".Spanify(), StringComparison.OrdinalIgnoreCase); 915 Assert.StartsWith("HELLO".Spanify(), "Hello, world!".AsSpan(), StringComparison.OrdinalIgnoreCase); 959 verify(() => Assert.StartsWith(expected.Spanify(), actual.Spanify())); 960 verify(() => Assert.StartsWith(expected.AsSpan(), actual.Spanify())); 961 verify(() => Assert.StartsWith(expected.Spanify(), actual.AsSpan()));