jj: throw exception instead of swallowing

This commit is contained in:
Jonathan Jenne
2018-11-09 15:54:51 +01:00
parent 5748d37227
commit 734becb971
10 changed files with 15 additions and 389 deletions

View File

@@ -7,11 +7,11 @@ Imports DigitalData.Modules.Logging
''' Test creating the log path in various configurations
''' </summary>
<TestClass()> Public Class ConstructorUnitTest
Private Shared ReadOnly _currentDirectoryLogPath = Path.Combine(Directory.GetCurrentDirectory(), "Log")
Private Shared ReadOnly _appdataDirectoryLogPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Digital Data", "Modules.Logging")
Private Shared ReadOnly _customDirectoryLogPath = Path.Combine(Directory.GetCurrentDirectory(), "CustomLogFolder")
Private Shared ReadOnly _restrictedDirectoryLogPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "ShouldNotBeCreated")
Private Shared ReadOnly _nonsenseDirectoryLogPath = "X:\FOO\BAR\BAZ\QUUX"
Private Shared _currentDirectoryLogPath = Path.Combine(Directory.GetCurrentDirectory(), "Log")
Private Shared _appdataDirectoryLogPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Digital Data", "Modules.Logging")
Private Shared _customDirectoryLogPath = Path.Combine(Directory.GetCurrentDirectory(), "CustomLogFolder")
Private Shared _restrictedDirectoryLogPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "ShouldNotBeCreated")
Private Shared _nonsenseDirectoryLogPath = "X:\FOO\BAR\BAZ\QUUX"
<TestMethod()> Public Sub TestConstructorCurrentDirectory()
Dim oLogConfig As New LogConfig(LogConfig.PathType.CurrentDirectory)