public void ImportData_TypeWithoutPublicParameterlessCtor_Throws() { var type = TypeExcelFactory.ClassWithParameterizedCtor; var stream = StreamFactory.GetExcelMemoryStream(); var ex = Assert.Catch <TypeAccessException> (() => ExcelImporter.ImportData(stream, type, 0)); StringAssert.Contains("has no public parameterless constructor!", ex.Message); }