diff --git a/src/test/java/pl/damianszczepanik/jenkins/buildhistorymanager/model/actions/DeleteArtifactsMatchingPatternsActionTest.java b/src/test/java/pl/damianszczepanik/jenkins/buildhistorymanager/model/actions/DeleteArtifactsMatchingPatternsActionTest.java index 2ef5966f..81b5e79d 100644 --- a/src/test/java/pl/damianszczepanik/jenkins/buildhistorymanager/model/actions/DeleteArtifactsMatchingPatternsActionTest.java +++ b/src/test/java/pl/damianszczepanik/jenkins/buildhistorymanager/model/actions/DeleteArtifactsMatchingPatternsActionTest.java @@ -343,6 +343,9 @@ public void testDeleteParentDirectories() { Assert.assertFalse(parentDir.exists()); Assert.assertFalse(grandparentDir.exists()); Assert.assertTrue(archiveRootDir.exists()); + + // This is the scenario where directory is null for code coverage + deleteInstance.deleteParentDirectories(null); } @Test // testing deleteDirectory method for successful directory deletion for code coverage