diff --git a/BACKLOG.MD b/BACKLOG.MD index b38ed824..8700eb59 100644 --- a/BACKLOG.MD +++ b/BACKLOG.MD @@ -20,7 +20,7 @@ 1. [ISHREMOTE-029] Overload `Set-IshValueField` to accept IshObject/IshFolder 1. [ISHREMOTE-035] Add `Get-IshSettingWorkflow` which in turn requires `IshSettingWorkflowSetup` and `IshSettingWorkflowTransition` 1. [ISHREMOTE-031] Extend parameter `-FolderPath` with intellisense -1. [ISHREMOTE-006] Add Missing/Legacy Pester tests +1. [ISHREMOTE-006] Add Missing/Legacy Pester tests Issue #4 1. [ISHREMOTE-016] Add `Filter-IshObject` cmdlet taking MetadataFilter parameter to do client-side object filtering 1. [ISHREMOTE-014] Add `Test-IshFolder` 1. [ISHREMOTE-027] Add `Test-IshDocumentObj` and `Test-PublicationOutput` diff --git a/Source/ISHRemote/Trisoft.ISHRemote/Cmdlets/Field/GetIshMetadataField.Tests.ps1 b/Source/ISHRemote/Trisoft.ISHRemote/Cmdlets/Field/GetIshMetadataField.Tests.ps1 index 9f0a3cb2..a30a1973 100644 --- a/Source/ISHRemote/Trisoft.ISHRemote/Cmdlets/Field/GetIshMetadataField.Tests.ps1 +++ b/Source/ISHRemote/Trisoft.ISHRemote/Cmdlets/Field/GetIshMetadataField.Tests.ps1 @@ -81,6 +81,28 @@ Describe “Get-IshMetadataField" -Tags "Read" { (Get-IshEvent -IshSession $ishSession -ModifiedSince (Get-Date).AddMonths(-3) | Get-IshMetadataField -IshSession $ishSession -Name "EVENTTYPE" -Level Progress).Count -ge 0 | Should Be $true } } + + Context "Get-IshMetadataField IshFields.ToXml() for API Testing" { + It "Trisoft.ISHRemote.Objects.IShFields is public" { + { New-Object -TypeName Trisoft.ISHRemote.Objects.IShFields } | Should Not Throw + } + It "Trisoft.ISHRemote.Objects.IShFields.AddField() is public" { + { (New-Object -TypeName Trisoft.ISHRemote.Objects.IShFields).AddField((Set-IshRequestedMetadataField -IshSession $ishSession -Name "USERNAME")).ToXml() } | Should Not Throw + } + It "Trisoft.ISHRemote.Objects.IShFields.ToXml() xml content single" { + $ishFields = New-Object -TypeName Trisoft.ISHRemote.Objects.IShFields + $ishFields.AddField((Set-IshRequestedMetadataField -IshSession $ishSession -Name "USERNAME")) + $result = '' + $ishFields.ToXML() -eq $result | Should Be $true + } + It "Trisoft.ISHRemote.Objects.IShFields.ToXml() xml content multiple" { + $ishFields = New-Object -TypeName Trisoft.ISHRemote.Objects.IShFields + $ishFields.AddField((Set-IshRequestedMetadataField -IshSession $ishSession -Name "USERNAME")) + $ishFields.AddField((Set-IshRequestedMetadataField -IshSession $ishSession -Name "FUSERGROUP")) + $result = '' + $ishFields.ToXML() -eq $result | Should Be $true + } + } }