44 lines
1.2 KiB
VB.net
44 lines
1.2 KiB
VB.net
Imports Connectors.Common.slt.Entities
|
|
Imports Microsoft.VisualStudio.TestTools.UnitTesting
|
|
|
|
Namespace Connectors.Test.slt
|
|
<TestClass>
|
|
Public Class ExtensionTest
|
|
Public oDocument1 As New sltDocument With {
|
|
.ExtDocId = "DOCID",
|
|
.DocOriginalFilename = "Rindenmoos Am Mittelfeld 15 msh alb 2022-05-20.dwg",
|
|
.Name = "Rindenmoos Am Mittelfeld 15 msh alb 2022-05-20"
|
|
}
|
|
|
|
Public oDocument2 As New sltDocument With {
|
|
.ExtDocId = "DOCID",
|
|
.DocOriginalFilename = "Anhörung städt. Tiefbauamt",
|
|
.Name = "Anhörung städt"
|
|
}
|
|
|
|
Public oDocument3 As New sltDocument With {
|
|
.ExtDocId = "DOCID",
|
|
.DocOriginalFilename = Nothing,
|
|
.Name = "Gutschrift-[TITEL].pdf"
|
|
}
|
|
|
|
<TestMethod>
|
|
Sub GetExtensionTest1()
|
|
Assert.AreEqual("DOCID.dwg", oDocument1.GetUniqueFilename())
|
|
End Sub
|
|
|
|
<TestMethod>
|
|
Sub GetExtensionTest2()
|
|
Assert.AreEqual("", oDocument2.GetUniqueFilename())
|
|
End Sub
|
|
|
|
<TestMethod>
|
|
Sub GetExtensionTest3()
|
|
Assert.AreEqual("DOCID.pdf", oDocument3.GetUniqueFilename())
|
|
End Sub
|
|
|
|
End Class
|
|
|
|
End Namespace
|
|
|