Beispiel #1
0
        public void ThrowOnGetElementTypeOfInvalidCollectionType(Type collectionType)
        {
            // Arrange
            var ctor = new ListConstructor();

            // Act, Assert
            Assert.Throws <NotSupportedException>(() => ctor.GetElementType(collectionType));
        }
Beispiel #2
0
        public void GetElementTypeOfValidCollectionType(Type collectionType, Type elementType)
        {
            // Arrange
            var ctor = new ListConstructor();

            // Act
            var actual = ctor.GetElementType(collectionType);

            // Assert
            Assert.Equal(elementType, actual);
        }