tests/functions/Get-D365ODataEntityUrl.Tests.ps1

Describe "Get-D365ODataEntityUrl 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 Get-D365ODataEntityUrl).ParameterSets.Name | Should -Be 'Default', 'Specific'
        }
        
        It 'Should have the expected parameter EntityName' {
            $parameter = (Get-Command Get-D365ODataEntityUrl).Parameters['EntityName']
            $parameter.Name | Should -Be 'EntityName'
            $parameter.ParameterType.ToString() | Should -Be System.String
            $parameter.IsDynamic | Should -Be $False
            $parameter.ParameterSets.Keys | Should -Be 'Specific'
            $parameter.ParameterSets.Keys | Should -Contain 'Specific'
            $parameter.ParameterSets['Specific'].IsMandatory | Should -Be $True
            $parameter.ParameterSets['Specific'].Position | Should -Be -2147483648
            $parameter.ParameterSets['Specific'].ValueFromPipeline | Should -Be $False
            $parameter.ParameterSets['Specific'].ValueFromPipelineByPropertyName | Should -Be $False
            $parameter.ParameterSets['Specific'].ValueFromRemainingArguments | Should -Be $False
        }
        It 'Should have the expected parameter EntitySetName' {
            $parameter = (Get-Command Get-D365ODataEntityUrl).Parameters['EntitySetName']
            $parameter.Name | Should -Be 'EntitySetName'
            $parameter.ParameterType.ToString() | Should -Be System.String
            $parameter.IsDynamic | Should -Be $False
            $parameter.ParameterSets.Keys | Should -Be 'Default'
            $parameter.ParameterSets.Keys | Should -Contain 'Default'
            $parameter.ParameterSets['Default'].IsMandatory | Should -Be $True
            $parameter.ParameterSets['Default'].Position | Should -Be -2147483648
            $parameter.ParameterSets['Default'].ValueFromPipeline | Should -Be $False
            $parameter.ParameterSets['Default'].ValueFromPipelineByPropertyName | Should -Be $True
            $parameter.ParameterSets['Default'].ValueFromRemainingArguments | Should -Be $False
        }
        It 'Should have the expected parameter Url' {
            $parameter = (Get-Command Get-D365ODataEntityUrl).Parameters['Url']
            $parameter.Name | Should -Be 'Url'
            $parameter.ParameterType.ToString() | Should -Be System.String
            $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 -2147483648
            $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 SystemUrl' {
            $parameter = (Get-Command Get-D365ODataEntityUrl).Parameters['SystemUrl']
            $parameter.Name | Should -Be 'SystemUrl'
            $parameter.ParameterType.ToString() | Should -Be System.String
            $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 -2147483648
            $parameter.ParameterSets['__AllParameterSets'].ValueFromPipeline | Should -Be $False
            $parameter.ParameterSets['__AllParameterSets'].ValueFromPipelineByPropertyName | Should -Be $False
            $parameter.ParameterSets['__AllParameterSets'].ValueFromRemainingArguments | Should -Be $False
        }
    }
    
    Describe "Testing parameterset Default" {
        <#
        Default -EntitySetName
        Default -EntitySetName -Url -SystemUrl
        #>

    }
     Describe "Testing parameterset Specific" {
        <#
        Specific -EntityName
        Specific -EntityName -Url -SystemUrl
        #>

    }

}