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()));