Skip to content

Commit

Permalink
Enhanced & fixed tests for Test-AdfCode cmdlet
Browse files Browse the repository at this point in the history
  • Loading branch information
NowinskiK committed Oct 29, 2024
1 parent 2709e44 commit c653462
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/Test-AdfCode.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,16 @@ InModuleScope azure.datafactory.tools {


Describe 'Test-AdfCode' -Tag 'Unit' {
It 'Should not throw an error when wrong path to DF is provided' {
It 'Should throw an error when wrong path to DF is provided' {
$DataFactoryName = "nullPathFactory"
$RootFolder = Join-Path -Path $PSScriptRoot -ChildPath $DataFactoryName
{
$script:res = Test-AdfCode -RootFolder $RootFolder -ConfigPath $null
} | Should -Throw
}
It 'Should not throw an error when correct path to DF is provided but ConfigPath is null' {
$DataFactoryName = "adf2"
$RootFolder = Join-Path -Path $PSScriptRoot -ChildPath $DataFactoryName
{
$script:res = Test-AdfCode -RootFolder $RootFolder -ConfigPath $null
} | Should -Not -Throw
Expand Down

0 comments on commit c653462

Please sign in to comment.