zugferdtest: fix test form
This commit is contained in:
parent
36326ba644
commit
374b1961e2
@ -126,38 +126,43 @@ Public Class Form1
|
|||||||
Dim oArgs As New WorkerArgs()
|
Dim oArgs As New WorkerArgs()
|
||||||
oArgs = LoadPropertyMapFor(oArgs)
|
oArgs = LoadPropertyMapFor(oArgs)
|
||||||
|
|
||||||
If oDialogResult = DialogResult.OK Then
|
Try
|
||||||
Dim oDoc = _zugferd.ValidateZUGFeRDFileWithGDPicture(OpenFileDialog1.FileName)
|
If oDialogResult = DialogResult.OK Then
|
||||||
Dim oResult = _zugferd.SerializeZUGFeRDDocument(oDoc)
|
Dim oDoc = _zugferd.ValidateZUGFeRDFileWithGDPicture(OpenFileDialog1.FileName)
|
||||||
oResult = _zugferd.ValidateZUGFeRDDocument(oResult)
|
Dim oResult = _zugferd.ValidateZUGFeRDDocument(oDoc)
|
||||||
|
oResult = _zugferd.SerializeZUGFeRDDocument(oDoc)
|
||||||
|
|
||||||
WriteLog("Specification: " & oResult.Specification)
|
WriteLog("Specification: " & oResult.Specification)
|
||||||
WriteLog("Embedded File Name: " & oResult.DataFileName)
|
WriteLog("Embedded File Name: " & oResult.DataFileName)
|
||||||
|
|
||||||
Dim oSpecification = oResult.Specification
|
Dim oSpecification = oResult.Specification
|
||||||
|
|
||||||
If oSpecification = ZUGFeRDInterface.ZUGFERD_SPEC_10 Then
|
If oSpecification = ZUGFeRDInterface.ZUGFERD_SPEC_10 Then
|
||||||
oSpecification = ZUGFeRDInterface.ZUGFERD_SPEC_DEFAULT
|
oSpecification = ZUGFeRDInterface.ZUGFERD_SPEC_DEFAULT
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oPropertyMap = oArgs.PropertyMap.
|
||||||
|
Where(Function(kv) kv.Value.Specification = oSpecification).
|
||||||
|
ToDictionary(Function(kv) kv.Key, Function(kv) kv.Value)
|
||||||
|
|
||||||
|
Dim oResult2 = _zugferd.PropertyValues.CheckPropertyValues(oResult.SchemaObject, oPropertyMap, "test")
|
||||||
|
|
||||||
|
WriteLog("Valid Properties: [{0}]", oResult2.ValidProperties.Count)
|
||||||
|
For Each Prop In oResult2.ValidProperties
|
||||||
|
WriteLog("Property: [{0}] = [{1}]", Prop.Description, Prop.Value)
|
||||||
|
Next
|
||||||
|
|
||||||
|
WriteLog("Missing Properties: [{0}]", oResult2.MissingProperties.Count)
|
||||||
|
For Each Prop In oResult2.MissingProperties
|
||||||
|
WriteLog("Missing Property: [{0}]", Prop)
|
||||||
|
Next
|
||||||
|
|
||||||
|
WriteLog("--------------------------------")
|
||||||
End If
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox(ex.Message)
|
||||||
|
End Try
|
||||||
|
|
||||||
Dim oPropertyMap = oArgs.PropertyMap.
|
|
||||||
Where(Function(kv) kv.Value.Specification = oSpecification).
|
|
||||||
ToDictionary(Function(kv) kv.Key, Function(kv) kv.Value)
|
|
||||||
|
|
||||||
Dim oResult2 = _zugferd.PropertyValues.CheckPropertyValues(oResult.SchemaObject, oPropertyMap, "test")
|
|
||||||
|
|
||||||
WriteLog("Valid Properties: [{0}]", oResult2.ValidProperties.Count)
|
|
||||||
For Each Prop In oResult2.ValidProperties
|
|
||||||
WriteLog("Property: [{0}] = [{1}]", Prop.Description, Prop.Value)
|
|
||||||
Next
|
|
||||||
|
|
||||||
WriteLog("Missing Properties: [{0}]", oResult2.MissingProperties.Count)
|
|
||||||
For Each Prop In oResult2.MissingProperties
|
|
||||||
WriteLog("Missing Property: [{0}]", Prop)
|
|
||||||
Next
|
|
||||||
|
|
||||||
WriteLog("--------------------------------")
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
|
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user