From ed03bd716e51f6faa560009ed42e2f448ba59e67 Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Mon, 1 Aug 2022 15:02:50 +0200 Subject: [PATCH] Thermal Fracture Import: Add test for loading non-existing file. --- .../UnitTests/RifThermalFractureReader-Test.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ApplicationLibCode/UnitTests/RifThermalFractureReader-Test.cpp b/ApplicationLibCode/UnitTests/RifThermalFractureReader-Test.cpp index 71ad181fde..a3a4e02226 100644 --- a/ApplicationLibCode/UnitTests/RifThermalFractureReader-Test.cpp +++ b/ApplicationLibCode/UnitTests/RifThermalFractureReader-Test.cpp @@ -92,3 +92,16 @@ TEST( RifThermalFractureReaderTest, LoadFileMixedUnits ) EXPECT_FALSE( errorMessage.isEmpty() ); EXPECT_FALSE( fractureData.get() ); } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +TEST( RifThermalFractureReaderTest, LoadFileNonExistingFiles ) +{ + QString fileName = CASE_REAL_TEST_DATA_DIRECTORY_03 + "this_file_does_not_exist.csv"; + + auto [fractureData, errorMessage] = RifThermalFractureReader::readFractureCsvFile( fileName ); + + EXPECT_FALSE( errorMessage.isEmpty() ); + EXPECT_FALSE( fractureData.get() ); +}