コード例 #1
0
        public void rObjectsReturnsCorrectResult(object[] objects)
        {
            var sut = new FieldInfoElementRefraction <object>();

            var actual = sut.Refract(objects);

            var expected = objects
                           .OfType <FieldInfo>()
                           .Select(fi => new FieldInfoElement(fi))
                           .Cast <IReflectionElement>();

            Assert.Equal(expected, actual);
        }
コード例 #2
0
        public void rNullSourceThrows()
        {
            var sut = new FieldInfoElementRefraction <object>();

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