188 references to Memoryify
Microsoft.DotNet.XUnitAssert.Tests (188)
MemoryAssertsTests.cs (84)
24 Assert.Contains("wor".Memoryify(), "Hello, world!".Memoryify()); 44 var ex = Record.Exception(() => Assert.Contains("WORLD".Memoryify(), "Hello, world!".Memoryify())); 64 Assert.Contains("WORLD".Memoryify(), "Hello, world!".Memoryify(), StringComparison.OrdinalIgnoreCase); 84 var ex = Record.Exception(() => Assert.Contains("foo".Memoryify(), default(string).Memoryify())); 100 "We are looking for something very long as well".Memoryify(), 101 "This is a relatively long string so that we can see the truncation in action".Memoryify() 205 Assert.DoesNotContain("hey".Memoryify(), "Hello, world!".Memoryify()); 217 Assert.DoesNotContain("WORLD".Memoryify(), "Hello, world!".Memoryify()); 238 var ex = Record.Exception(() => Assert.DoesNotContain("WORLD".Memoryify(), "Hello, world!".Memoryify(), StringComparison.OrdinalIgnoreCase)); 268 var ex = Record.Exception(() => Assert.DoesNotContain("world".Memoryify(), "Hello, world!".Memoryify())); 289 Assert.DoesNotContain("foo".Memoryify(), default(string).Memoryify()); 295 var ex = Record.Exception(() => Assert.DoesNotContain("world".Memoryify(), "Hello, world from a very long string that will end up being truncated".Memoryify())); 310 var ex = Record.Exception(() => Assert.DoesNotContain("world".Memoryify(), "This is a relatively long string that has 'Hello, world' placed in the middle so that we can dual trunaction".Memoryify())); 325 var ex = Record.Exception(() => Assert.DoesNotContain("world".Memoryify(), "This is a relatively long string that will from the front truncated, just to say 'Hello, world'".Memoryify())); 425 Assert.EndsWith("world!".AsMemory(), "Hello, world!".Memoryify()); 426 Assert.EndsWith("world!".Memoryify(), "Hello, world!".AsMemory()); 427 Assert.EndsWith("world!".Memoryify(), "Hello, world!".Memoryify()); 447 assertFailure(() => Assert.EndsWith("hey".AsMemory(), "Hello, world!".Memoryify())); 448 assertFailure(() => Assert.EndsWith("hey".Memoryify(), "Hello, world!".AsMemory())); 449 assertFailure(() => Assert.EndsWith("hey".Memoryify(), "Hello, world!".Memoryify())); 469 assertFailure(() => Assert.EndsWith("WORLD!".AsMemory(), "world!".Memoryify())); 470 assertFailure(() => Assert.EndsWith("WORLD!".Memoryify(), "world!".AsMemory())); 471 assertFailure(() => Assert.EndsWith("WORLD!".Memoryify(), "world!".Memoryify())); 478 Assert.EndsWith("WORLD!".AsMemory(), "Hello, world!".Memoryify(), StringComparison.OrdinalIgnoreCase); 479 Assert.EndsWith("WORLD!".Memoryify(), "Hello, world!".AsMemory(), StringComparison.OrdinalIgnoreCase); 480 Assert.EndsWith("WORLD!".Memoryify(), "Hello, world!".Memoryify(), StringComparison.OrdinalIgnoreCase); 500 assertFailure(() => Assert.EndsWith("foo".Memoryify(), null)); 523 assertFailure(() => Assert.EndsWith(expected.AsMemory(), actual.Memoryify())); 524 assertFailure(() => Assert.EndsWith(expected.Memoryify(), actual.AsMemory())); 525 assertFailure(() => Assert.EndsWith(expected.Memoryify(), actual.Memoryify())); 588 Assert.Equal(value1.AsMemory(), value2.Memoryify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 589 Assert.Equal(value2.AsMemory(), value1.Memoryify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 592 Assert.Equal(value1.Memoryify(), value2.AsMemory(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 593 Assert.Equal(value2.Memoryify(), value1.AsMemory(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 596 Assert.Equal(value1.Memoryify(), value2.Memoryify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 597 Assert.Equal(value2.Memoryify(), value1.Memoryify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 649 assertFailure(() => Assert.Equal(expected.Memoryify(), actual.AsMemory(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace)); 650 assertFailure(() => Assert.Equal(expected.AsMemory(), actual.Memoryify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace)); 651 assertFailure(() => Assert.Equal(expected.Memoryify(), actual.Memoryify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace)); 681 "Why hello there world! You're a long string!".Memoryify() 686 "Why hello there world, you're a long string with some truncation!".Memoryify(), 692 "Why hello there world, you're a long string with some truncation!".Memoryify(), 693 "Why hello there world! You're a long string!".Memoryify() 842 Assert.StartsWith("Hello".AsMemory(), "Hello, world!".Memoryify()); 843 Assert.StartsWith("Hello".Memoryify(), "Hello, world!".AsMemory()); 844 Assert.StartsWith("Hello".Memoryify(), "Hello, world!".Memoryify()); 864 assertFailure(() => Assert.StartsWith("hey".AsMemory(), "Hello, world!".Memoryify())); 865 assertFailure(() => Assert.StartsWith("hey".Memoryify(), "Hello, world!".AsMemory())); 866 assertFailure(() => Assert.StartsWith("hey".Memoryify(), "Hello, world!".Memoryify())); 886 assertFailure(() => Assert.StartsWith("WORLD!".AsMemory(), "world!".Memoryify())); 887 assertFailure(() => Assert.StartsWith("WORLD!".Memoryify(), "world!".AsMemory())); 888 assertFailure(() => Assert.StartsWith("WORLD!".Memoryify(), "world!".Memoryify())); 895 Assert.StartsWith("HELLO".AsMemory(), "Hello, world!".Memoryify(), StringComparison.OrdinalIgnoreCase); 896 Assert.StartsWith("HELLO".Memoryify(), "Hello, world!".AsMemory(), StringComparison.OrdinalIgnoreCase); 897 Assert.StartsWith("HELLO".Memoryify(), "Hello, world!".Memoryify(), StringComparison.OrdinalIgnoreCase); 917 assertFailure(() => Assert.StartsWith("foo".Memoryify(), null)); 940 assertFailure(() => Assert.StartsWith(expected.AsMemory(), actual.Memoryify())); 941 assertFailure(() => Assert.StartsWith(expected.Memoryify(), actual.AsMemory())); 942 assertFailure(() => Assert.StartsWith(expected.Memoryify(), actual.Memoryify()));
StringAssertsTests.cs (104)
15 Assert.Contains("wor".Memoryify(), "Hello, world!".Memoryify()); 16 Assert.Contains("wor".AsMemory(), "Hello, world!".Memoryify()); 17 Assert.Contains("wor".Memoryify(), "Hello, world!".AsMemory()); 44 verify(() => Assert.Contains("WORLD".Memoryify(), "Hello, world!".Memoryify())); 45 verify(() => Assert.Contains("WORLD".AsMemory(), "Hello, world!".Memoryify())); 46 verify(() => Assert.Contains("WORLD".Memoryify(), "Hello, world!".AsMemory())); 73 verify(() => Assert.Contains("hey".Memoryify(), "Hello, world!".Memoryify())); 74 verify(() => Assert.Contains("hey".AsMemory(), "Hello, world!".Memoryify())); 75 verify(() => Assert.Contains("hey".Memoryify(), "Hello, world!".AsMemory())); 119 verify(() => Assert.Contains(expected.Memoryify(), actual.Memoryify())); 120 verify(() => Assert.Contains(expected.AsMemory(), actual.Memoryify())); 121 verify(() => Assert.Contains(expected.Memoryify(), actual.AsMemory())); 135 Assert.Contains("WORLD".Memoryify(), "Hello, world!".Memoryify(), StringComparison.OrdinalIgnoreCase); 136 Assert.Contains("WORLD".AsMemory(), "Hello, world!".Memoryify(), StringComparison.OrdinalIgnoreCase); 137 Assert.Contains("WORLD".Memoryify(), "Hello, world!".AsMemory(), StringComparison.OrdinalIgnoreCase); 154 Assert.DoesNotContain("hey".Memoryify(), "Hello, world!".Memoryify()); 155 Assert.DoesNotContain("hey".AsMemory(), "Hello, world!".Memoryify()); 156 Assert.DoesNotContain("hey".Memoryify(), "Hello, world!".AsMemory()); 170 Assert.DoesNotContain("WORLD".Memoryify(), "Hello, world!".Memoryify()); 171 Assert.DoesNotContain("WORLD".AsMemory(), "Hello, world!".Memoryify()); 172 Assert.DoesNotContain("WORLD".Memoryify(), "Hello, world!".AsMemory()); 200 verify(() => Assert.DoesNotContain("world".Memoryify(), "Hello, world!".Memoryify())); 201 verify(() => Assert.DoesNotContain("world".AsMemory(), "Hello, world!".Memoryify())); 202 verify(() => Assert.DoesNotContain("world".Memoryify(), "Hello, world!".AsMemory())); 236 verify(() => Assert.DoesNotContain("world".Memoryify(), "Hello, world from a very long string that will end up being truncated".Memoryify())); 237 verify(() => Assert.DoesNotContain("world".AsMemory(), "Hello, world from a very long string that will end up being truncated".Memoryify())); 238 verify(() => Assert.DoesNotContain("world".Memoryify(), "Hello, world from a very long string that will end up being truncated".AsMemory())); 266 verify(() => Assert.DoesNotContain("world".Memoryify(), "This is a relatively long string that has 'Hello, world' placed in the middle so that we can dual trunaction".Memoryify())); 267 verify(() => Assert.DoesNotContain("world".AsMemory(), "This is a relatively long string that has 'Hello, world' placed in the middle so that we can dual trunaction".Memoryify())); 268 verify(() => Assert.DoesNotContain("world".Memoryify(), "This is a relatively long string that has 'Hello, world' placed in the middle so that we can dual trunaction".AsMemory())); 296 verify(() => Assert.DoesNotContain("world".Memoryify(), "This is a relatively long string that will from the front truncated, just to say 'Hello, world'".Memoryify())); 297 verify(() => Assert.DoesNotContain("world".AsMemory(), "This is a relatively long string that will from the front truncated, just to say 'Hello, world'".Memoryify())); 298 verify(() => Assert.DoesNotContain("world".Memoryify(), "This is a relatively long string that will from the front truncated, just to say 'Hello, world'".AsMemory())); 326 verify(() => Assert.DoesNotContain("WORLD".Memoryify(), "Hello, world!".Memoryify(), StringComparison.OrdinalIgnoreCase)); 327 verify(() => Assert.DoesNotContain("WORLD".AsMemory(), "Hello, world!".Memoryify(), StringComparison.OrdinalIgnoreCase)); 328 verify(() => Assert.DoesNotContain("WORLD".Memoryify(), "Hello, world!".AsMemory(), StringComparison.OrdinalIgnoreCase)); 433 Assert.EndsWith("world!".Memoryify(), "Hello, world!".Memoryify()); 434 Assert.EndsWith("world!".AsMemory(), "Hello, world!".Memoryify()); 435 Assert.EndsWith("world!".Memoryify(), "Hello, world!".AsMemory()); 462 verify(() => Assert.EndsWith("hey".Memoryify(), "Hello, world!".Memoryify())); 463 verify(() => Assert.EndsWith("hey".AsMemory(), "Hello, world!".Memoryify())); 464 verify(() => Assert.EndsWith("hey".Memoryify(), "Hello, world!".AsMemory())); 491 verify(() => Assert.EndsWith("WORLD!".Memoryify(), "world!".Memoryify())); 492 verify(() => Assert.EndsWith("WORLD!".AsMemory(), "world!".Memoryify())); 493 verify(() => Assert.EndsWith("WORLD!".Memoryify(), "world!".AsMemory())); 507 Assert.EndsWith("WORLD!".Memoryify(), "Hello, world!".Memoryify(), StringComparison.OrdinalIgnoreCase); 508 Assert.EndsWith("WORLD!".AsMemory(), "Hello, world!".Memoryify(), StringComparison.OrdinalIgnoreCase); 509 Assert.EndsWith("WORLD!".Memoryify(), "Hello, world!".AsMemory(), StringComparison.OrdinalIgnoreCase); 553 verify(() => Assert.EndsWith(expected.Memoryify(), actual.Memoryify())); 554 verify(() => Assert.EndsWith(expected.AsMemory(), actual.Memoryify())); 555 verify(() => Assert.EndsWith(expected.Memoryify(), actual.AsMemory())); 618 Assert.Equal(value1.Memoryify(), value2.Memoryify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 619 Assert.Equal(value2.Memoryify(), value1.Memoryify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 620 Assert.Equal(value1.AsMemory(), value2.Memoryify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 621 Assert.Equal(value2.AsMemory(), value1.Memoryify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 622 Assert.Equal(value1.Memoryify(), value2.AsMemory(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 623 Assert.Equal(value2.Memoryify(), value1.AsMemory(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace); 689 verify(() => Assert.Equal(expected.Memoryify(), actual.Memoryify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace)); 690 verify(() => Assert.Equal(expected.AsMemory(), actual.Memoryify(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace)); 691 verify(() => Assert.Equal(expected.Memoryify(), actual.AsMemory(), ignoreCase, ignoreLineEndingDifferences, ignoreWhiteSpaceDifferences, ignoreAllWhiteSpace)); 724 verify(() => Assert.Equal(expected.Memoryify(), actual.Memoryify())); 725 verify(() => Assert.Equal(expected.AsMemory(), actual.Memoryify())); 726 verify(() => Assert.Equal(expected.Memoryify(), actual.AsMemory())); 835 Assert.StartsWith("Hello".Memoryify(), "Hello, world!".Memoryify()); 836 Assert.StartsWith("Hello".AsMemory(), "Hello, world!".Memoryify()); 837 Assert.StartsWith("Hello".Memoryify(), "Hello, world!".AsMemory()); 864 verify(() => Assert.StartsWith("hey".Memoryify(), "Hello, world!".Memoryify())); 865 verify(() => Assert.StartsWith("hey".AsMemory(), "Hello, world!".Memoryify())); 866 verify(() => Assert.StartsWith("hey".Memoryify(), "Hello, world!".AsMemory())); 893 verify(() => Assert.StartsWith("WORLD!".Memoryify(), "world!".Memoryify())); 894 verify(() => Assert.StartsWith("WORLD!".AsMemory(), "world!".Memoryify())); 895 verify(() => Assert.StartsWith("WORLD!".Memoryify(), "world!".AsMemory())); 909 Assert.StartsWith("HELLO".Memoryify(), "Hello, world!".Memoryify(), StringComparison.OrdinalIgnoreCase); 910 Assert.StartsWith("HELLO".AsMemory(), "Hello, world!".Memoryify(), StringComparison.OrdinalIgnoreCase); 911 Assert.StartsWith("HELLO".Memoryify(), "Hello, world!".AsMemory(), StringComparison.OrdinalIgnoreCase); 955 verify(() => Assert.StartsWith(expected.Memoryify(), actual.Memoryify())); 956 verify(() => Assert.StartsWith(expected.AsMemory(), actual.Memoryify())); 957 verify(() => Assert.StartsWith(expected.Memoryify(), actual.AsMemory()));