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

            var actual = sut.Refract(objects);

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

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

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