add EDMI.File Module
This commit is contained in:
21
EDMI.File.Test/PathTest.vb
Normal file
21
EDMI.File.Test/PathTest.vb
Normal file
@@ -0,0 +1,21 @@
|
||||
Imports System.Text
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports Microsoft.VisualStudio.TestTools.UnitTesting
|
||||
Imports DigitalData.Modules.EDMI
|
||||
|
||||
<TestClass()> Public Class PathTest
|
||||
|
||||
<TestMethod()> Public Sub TestMethod1()
|
||||
Dim oLogConfig As New LogConfig(LogConfig.PathType.Temp)
|
||||
Dim oPath As New DigitalData.Modules.EDMI.File.Path(oLogConfig)
|
||||
Dim oNow As DateTime = DateTime.Now
|
||||
Dim oYear = oNow.Year
|
||||
Dim oMonth = oNow.Month.ToString.PadLeft(2, "0")
|
||||
Dim oDay = oNow.Day.ToString.PadLeft(2, "0")
|
||||
|
||||
|
||||
Assert.AreEqual(oPath.GetActivePath("TestDocumentType"), $"EDMI\Active\TestDocumentType\{oYear}\{oMonth}\{oDay}")
|
||||
Assert.AreEqual(oPath.GetActivePath("TestDocumentType"), $"EDMI\Archive\TestDocumentType\{oYear}\{oMonth}\{oDay}")
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user