File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -271,28 +271,6 @@ public void export_collection_throws_when_filepath_null()
271271 Assert . Equal ( "File path cannot be null or empty (Parameter 'filePath')" , exception . Message ) ;
272272 }
273273
274- // ExportCollection throws IOException when there is an IO error during export
275- // [Fact]
276- // public void export_collection_throws_ioexception_on_io_error()
277- // {
278- // // Arrange
279- // var filePath = "invalid_path/test.csv";
280- // var testData = new List<TestClass> { new TestClass() };
281- // var format = CoreUtils.ExportFormat.CSV;
282-
283- // // Mock the export strategy to throw an IOException
284- // var mockExportStrategy = new Mock<IExportStrategy>();
285- // mockExportStrategy
286- // .Setup(strategy => strategy.Export(It.IsAny<string>(), It.IsAny<IEnumerable<TestClass>>()))
287- // .Throws(new IOException("IO error"));
288-
289- // DataExporter.ExportStrategies[format] = mockExportStrategy.Object;
290-
291- // // Act & Assert
292- // Assert.Throws<IOException>(() =>
293- // DataExporter.ExportCollection(filePath, testData, format));
294- // }
295-
296274 protected virtual void Dispose ( bool disposing )
297275 {
298276 if ( ! _disposed )
Original file line number Diff line number Diff line change @@ -14,11 +14,6 @@ public static class DataExporter
1414 { CoreUtils . ExportFormat . JSON , new JsonExportStrategy ( ) }
1515 } ;
1616
17- public static Dictionary < CoreUtils . ExportFormat , IExportStrategy > ExportStrategies
18- {
19- get { return _exportStrategies ; }
20- }
21-
2217 public static void Export < T > ( string filePath , T data , CoreUtils . ExportFormat format ) where T : class
2318 {
2419 ArgumentNullException . ThrowIfNull ( data ) ;
You can’t perform that action at this time.
0 commit comments