forked from d365collaborative/d365fo.tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This pull request was automatically created by the d365fo.tools-Generate-Text action'
- Loading branch information
Showing
5 changed files
with
168 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 9 additions & 8 deletions
17
d365fo.tools/internal/functions/publish-d365foresources.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
d365fo.tools/tests/functions/Publish-D365WebResources.Tests.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
Describe "Publish-D365WebResources 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 Publish-D365WebResources).ParameterSets.Name | Should -Be '__AllParameterSets' | ||
} | ||
|
||
It 'Should have the expected parameter PackageDirectory' { | ||
$parameter = (Get-Command Publish-D365WebResources).Parameters['PackageDirectory'] | ||
$parameter.Name | Should -Be 'PackageDirectory' | ||
$parameter.ParameterType.ToString() | Should -Be PSFramework.Parameter.PathDirectoryParameter | ||
$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 AosServiceWebRootPath' { | ||
$parameter = (Get-Command Publish-D365WebResources).Parameters['AosServiceWebRootPath'] | ||
$parameter.Name | Should -Be 'AosServiceWebRootPath' | ||
$parameter.ParameterType.ToString() | Should -Be PSFramework.Parameter.PathDirectoryParameter | ||
$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 | ||
} | ||
} | ||
|
||
Describe "Testing parameterset __AllParameterSets" { | ||
<# | ||
__AllParameterSets - | ||
__AllParameterSets -PackageDirectory -AosServiceWebRootPath | ||
#> | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
external help file: d365fo.tools-help.xml | ||
Module Name: d365fo.tools | ||
online version: | ||
schema: 2.0.0 | ||
--- | ||
|
||
# Publish-D365WebResources | ||
|
||
## SYNOPSIS | ||
Deploy web resources | ||
|
||
## SYNTAX | ||
|
||
``` | ||
Publish-D365WebResources [[-PackageDirectory] <PathDirectoryParameter>] | ||
[[-AosServiceWebRootPath] <PathDirectoryParameter>] [<CommonParameters>] | ||
``` | ||
|
||
## DESCRIPTION | ||
Deploys the Dynamics 365 for Finance and Operations web resources to the AOS service web root path. | ||
|
||
## EXAMPLES | ||
|
||
### EXAMPLE 1 | ||
``` | ||
Publish-D365WebResources | ||
``` | ||
|
||
This will deploy the web resources to the AOS service web root path. | ||
|
||
## PARAMETERS | ||
|
||
### -PackageDirectory | ||
Path to the package directory containing the web resources. | ||
|
||
```yaml | ||
Type: PathDirectoryParameter | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: False | ||
Position: 1 | ||
Default value: $Script:PackageDirectory | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### -AosServiceWebRootPath | ||
Path to the AOS service web root path. | ||
```yaml | ||
Type: PathDirectoryParameter | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: False | ||
Position: 2 | ||
Default value: $Script:AOSPath | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### CommonParameters | ||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). | ||
## INPUTS | ||
## OUTPUTS | ||
## NOTES | ||
Author: Florian Hopfner (@FH-Inway) | ||
## RELATED LINKS |