System\Value\StoringArrays.cs (24)
16Assert.Same(b, value.GetValue<byte[]>());
17Assert.Equal(b, (byte[])value.GetValue<object>());
19Assert.Throws<InvalidCastException>(() => value.GetValue<ArraySegment<byte>>());
30Assert.Same(b, value.GetValue<char[]>());
31Assert.Equal(b, (char[])value.GetValue<object>());
33Assert.Throws<InvalidCastException>(() => value.GetValue<ArraySegment<char>>());
45Assert.Equal(segment, value.GetValue<ArraySegment<byte>>());
46Assert.Equal(segment, (ArraySegment<byte>)value.GetValue<object>());
47Assert.Throws<InvalidCastException>(() => value.GetValue<byte[]>());
52Assert.Equal(segment, value.GetValue<ArraySegment<byte>>());
53Assert.Equal(segment, (ArraySegment<byte>)value.GetValue<object>());
54Assert.Throws<InvalidCastException>(() => value.GetValue<byte[]>());
59Assert.Equal(segment, value.GetValue<ArraySegment<byte>>());
60Assert.Equal(segment, (ArraySegment<byte>)value.GetValue<object>());
61Assert.Throws<InvalidCastException>(() => value.GetValue<byte[]>());
73Assert.Equal(segment, value.GetValue<ArraySegment<char>>());
74Assert.Equal(segment, (ArraySegment<char>)value.GetValue<object>());
75Assert.Throws<InvalidCastException>(() => value.GetValue<char[]>());
80Assert.Equal(segment, value.GetValue<ArraySegment<char>>());
81Assert.Equal(segment, (ArraySegment<char>)value.GetValue<object>());
82Assert.Throws<InvalidCastException>(() => value.GetValue<char[]>());
87Assert.Equal(segment, value.GetValue<ArraySegment<char>>());
88Assert.Equal(segment, (ArraySegment<char>)value.GetValue<object>());
89Assert.Throws<InvalidCastException>(() => value.GetValue<char[]>());