0
PluginAttribute
으로 장식 된 모든 유형을로드하는 특정 메소드에 대해 단위 테스트를 작성합니다.두더지 스텁 및 특성
수동으로 스텁을 만들고 PluginAttribute로 꾸미는 대신에 Moles 생성 스텁 객체에 속성을 주입하는 방법이 있습니까?
foreach (Type t in types)
{
var attr = Attribute.GetCustomAttribute(t, typeof(PluginAttribute), false) as PluginAttribute;
if (attr != null)
{
_checksLookup.Add(attr.ElementName, t);
}
}
}
네, 이것이 제가 한 것입니다. – Ian