public void DeleteFileByWildCardTest() { var step = new CreateStep(); step.CreationPath = @"..\..\TestData\DeleteTest_FileToBeDeleted1.wildCardTestxml"; var dl = new FileDataLoader(); dl.FilePath = @"..\..\TestData\PurchaseOrder001.xml"; step.DataSource = dl; step.Execute(new Context()); step.CreationPath = @"..\..\TestData\DeleteTest_FileToBeDeleted2.wildCardTestxml"; step.Execute(new Context()); var deleteStep = new DeleteStep(); deleteStep.FilePathsToDelete.Add(@"..\..\TestData\*.wildCardTestxml"); deleteStep.Execute(new Context()); try { var deletedFile = System.IO.File.Open(@"..\..\TestData\DeleteTest_FileToBeDeleted.wildCardTestxml", FileMode.Open, FileAccess.Read); } catch (System.IO.FileNotFoundException) { ; // Expected! } }