public void ToArray_With_ValidData_Collections_Must_Succeed(int[] source) { // Arrange var wrapped = Wrap.AsValueCollection(source); var expected = System.Linq.Enumerable.ToArray(source); // Act var result = ReadOnlyList .ToArray <Wrap.ValueCollection <int>, int>(wrapped); // Assert _ = result.Must() .BeArrayOf <int>() .BeEqualTo(expected); }
public void ToArray_With_ValidData_Collections_Must_Succeed(int[] source) { // Arrange var wrapped = Wrap .AsValueCollection(source); var expected = Enumerable .ToArray(source); // Act var result = ValueEnumerableExtensions .ToArray <Wrap.ValueCollectionWrapper <int>, Wrap.Enumerator <int>, int>(wrapped); // Assert _ = result.Must() .BeArrayOf <int>() .BeEqualTo(expected); }
public void ToArray_With_ValidData_Collections_Must_Succeed(int[] source) { // Arrange var wrapped = Wrap .AsValueCollection(source); var expected = source .ToArray(); // Act var result = wrapped.AsValueEnumerable() .ToArray(); // Assert _ = result.Must() .BeArrayOf <int>() .BeEqualTo(expected); }
public void ToList_With_ValidData_Collections_Must_Succeed(int[] source) { // Arrange var wrapped = Wrap .AsValueCollection(source); var expected = System.Linq.Enumerable.ToList(source); // Act var result = ValueEnumerable .ToList <Wrap.ValueCollection <int>, Wrap.Enumerator <int>, int>(wrapped); // Assert _ = result.Must() .BeOfType <List <int> >() .BeEnumerableOf <int>() .BeEqualTo(expected); }