tests/functions/Set-D365RsatConfiguration.Tests.ps1

Describe "Set-D365RsatConfiguration Unit Tests" -Tag "Unit" {
    BeforeAll {
        # Place here all things needed to prepare for the tests
    }
    AfterAll {
        # Here is where all the cleanup tasks go
    }
    
    Describe "Ensuring unchanged command signature" {
        It "should have the expected parameter sets" {
            (Get-Command Set-D365RsatConfiguration).ParameterSets.Name | Should -Be '__AllParameterSets'
        }
        
        It 'Should have the expected parameter LogGenerationEnabled' {
            $parameter = (Get-Command Set-D365RsatConfiguration).Parameters['LogGenerationEnabled']
            $parameter.Name | Should -Be 'LogGenerationEnabled'
            $parameter.ParameterType.ToString() | Should -Be System.Boolean
            $parameter.IsDynamic | Should -Be $False
            $parameter.ParameterSets.Keys | Should -Be '__AllParameterSets'
            $parameter.ParameterSets.Keys | Should -Contain '__AllParameterSets'
            $parameter.ParameterSets['__AllParameterSets'].IsMandatory | Should -Be $False
            $parameter.ParameterSets['__AllParameterSets'].Position | Should -Be 0
            $parameter.ParameterSets['__AllParameterSets'].ValueFromPipeline | Should -Be $False
            $parameter.ParameterSets['__AllParameterSets'].ValueFromPipelineByPropertyName | Should -Be $False
            $parameter.ParameterSets['__AllParameterSets'].ValueFromRemainingArguments | Should -Be $False
        }
        It 'Should have the expected parameter VerboseSnapshotsEnabled' {
            $parameter = (Get-Command Set-D365RsatConfiguration).Parameters['VerboseSnapshotsEnabled']
            $parameter.Name | Should -Be 'VerboseSnapshotsEnabled'
            $parameter.ParameterType.ToString() | Should -Be System.Boolean
            $parameter.IsDynamic | Should -Be $False
            $parameter.ParameterSets.Keys | Should -Be '__AllParameterSets'
            $parameter.ParameterSets.Keys | Should -Contain '__AllParameterSets'
            $parameter.ParameterSets['__AllParameterSets'].IsMandatory | Should -Be $False
            $parameter.ParameterSets['__AllParameterSets'].Position | Should -Be 1
            $parameter.ParameterSets['__AllParameterSets'].ValueFromPipeline | Should -Be $False
            $parameter.ParameterSets['__AllParameterSets'].ValueFromPipelineByPropertyName | Should -Be $False
            $parameter.ParameterSets['__AllParameterSets'].ValueFromRemainingArguments | Should -Be $False
        }
        It 'Should have the expected parameter AddOperatorFieldsToExcelValidationEnabled' {
            $parameter = (Get-Command Set-D365RsatConfiguration).Parameters['AddOperatorFieldsToExcelValidationEnabled']
            $parameter.Name | Should -Be 'AddOperatorFieldsToExcelValidationEnabled'
            $parameter.ParameterType.ToString() | Should -Be System.Boolean
            $parameter.IsDynamic | Should -Be $False
            $parameter.ParameterSets.Keys | Should -Be '__AllParameterSets'
            $parameter.ParameterSets.Keys | Should -Contain '__AllParameterSets'
            $parameter.ParameterSets['__AllParameterSets'].IsMandatory | Should -Be $False
            $parameter.ParameterSets['__AllParameterSets'].Position | Should -Be 2
            $parameter.ParameterSets['__AllParameterSets'].ValueFromPipeline | Should -Be $False
            $parameter.ParameterSets['__AllParameterSets'].ValueFromPipelineByPropertyName | Should -Be $False
            $parameter.ParameterSets['__AllParameterSets'].ValueFromRemainingArguments | Should -Be $False
        }
    }
    
    Describe "Testing parameterset __AllParameterSets" {
        <#
        __AllParameterSets -
        __AllParameterSets -LogGenerationEnabled -VerboseSnapshotsEnabled -AddOperatorFieldsToExcelValidationEnabled
        #>

    }

}