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); }
public void RefractNullSourceThrows() { var sut = new MethodInfoElementRefraction <object>(); Assert.Throws <ArgumentNullException>(() => sut.Refract(null)); }