public void GivenAResultThenTheValueIsReturned(int[] values) { var context = new SerializableMessage(); var result = new SerializableEnumerableResult <int>(context, values); int[] actual = result; int[] expected = values ?? Array.Empty <int>(); Assert.Equal(expected, actual); }
public void GivenAnInstanceThenAllPropertiesAreSerialized() { var context = new SerializableMessage(); var result = new SerializableEnumerableResult <int>(context, new[] { 1, 2, 3 }); SerializableEnumerableResult <int> deserialized = result.Clone(); Assert.Equal(result, deserialized); Assert.NotSame(result, deserialized); Assert.Equal(result.Value, deserialized.Value); Assert.Equal(result.GetHashCode(), deserialized.GetHashCode()); }