Exemple #1
0
        public void RefractObjectsReturnsCorrectResult(object[] objects)
        {
            var sut = new ParameterInfoElementRefraction <object>();

            var actual = sut.Refract(objects);

            var expected = objects
                           .OfType <ParameterInfo>()
                           .Select(mi => new ParameterInfoElement(mi))
                           .Cast <IReflectionElement>();

            Assert.Equal(expected, actual);
        }
Exemple #2
0
        public void RefractNullSourceThrows()
        {
            var sut = new ParameterInfoElementRefraction <object>();

            Assert.Throws <ArgumentNullException>(() => sut.Refract(null));
        }