public void RefractObjectsReturnsCorrectResult(object[] objects) { var sut = new PropertyInfoElementRefraction <object>(); var actual = sut.Refract(objects); var expected = objects .OfType <PropertyInfo>() .Select(mi => new PropertyInfoElement(mi)) .Cast <IReflectionElement>(); Assert.Equal(expected, actual); }
public void RefractNullSourceThrows() { var sut = new PropertyInfoElementRefraction <object>(); Assert.Throws <ArgumentNullException>(() => sut.Refract(null)); }
public void SutIsReflectionElementRefraction() { var sut = new PropertyInfoElementRefraction <object>(); Assert.IsAssignableFrom <IReflectionElementRefraction <object> >(sut); }