Exemplo n.º 1
0
        public void ToDictionary_KeySelector_ElementSelector_With_ValidData_Must_Succeed(int[] source)
        {
            // Arrange
            var list     = source.ToList();
            var expected = Enumerable
                           .ToDictionary(source, item => item, item => item);

            // Act
            var result = ListBindings
                         .ToDictionary(list, item => item, item => item);

            // Assert
            _ = result.Must()
                .BeEnumerableOf <KeyValuePair <int, int> >()
                .BeEqualTo(expected, testNonGeneric: false);
        }