public void GetProperty_InvokePropertyInfo_ThrowsExcelMappingException() { var fallback = new ThrowFallback(); MemberInfo propertyInfo = typeof(TestClass).GetProperty(nameof(TestClass.Value)); Assert.Throws <ExcelMappingException>(() => fallback.PerformFallback(null, 0, new ReadCellValueResult(), propertyInfo)); }
public void GetProperty_InvokeEventInfo_ThrowsArgumentException() { var fallback = new ThrowFallback(); MemberInfo eventInfo = typeof(TestClass).GetEvent(nameof(TestClass.Event)); Assert.Throws <ArgumentException>("member", () => fallback.PerformFallback(null, 0, new ReadCellValueResult(), eventInfo)); }