Example #1
0
            public void ReadOnlyMemory_of_int_is_formatted_like_a_int_array()
            {
                var readOnlyMemory = new ReadOnlyMemory <int>(new[] { 1, 2, 3 });

                var output = readOnlyMemory.ToDisplayString();

                output.Should().Be("[ 1, 2, 3 ]");
            }
Example #2
0
            public void ReadOnlyMemory_of_string_is_formatted_like_a_string()
            {
                ReadOnlyMemory <char> readOnlyMemory = "Hi!".AsMemory();

                var output = readOnlyMemory.ToDisplayString();

                output.Should().Be("Hi!");
            }