Skip to content

Commit

Permalink
Merge pull request #43 from tigerfansga/BugFix_Linux
Browse files Browse the repository at this point in the history
Update PSClassUtils.psm1 and ClassUtils.Write-CUClassDiagram.Tests.ps1 for Linux support.
  • Loading branch information
Stephanevg committed Oct 12, 2018
2 parents 9bf4443 + b4f52f6 commit 942b924
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions PsClassUtils/PSClassUtils.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ foreach ($Private in $PrivateFunctions){
}

write-verbose "Loading Public Functions"
$PublicFunctions = gci "$ScriptPath\Functions\public" -Filter *.ps1 | Select -Expand FullName
$PublicFunctions = gci "$ScriptPath\Functions\Public" -Filter *.ps1 | Select -Expand FullName


foreach ($public in $PublicFunctions){
Expand All @@ -27,7 +27,7 @@ foreach ($public in $PublicFunctions){
}
}

$PrivateClasses = gci "$ScriptPath\Classes\Private" -Filter *.ps1 | sort Name | Select -Expand FullName
$PrivateClasses = gci "$ScriptPath\Classes\Private" -Filter *.ps1 | Sort-Object Name | Select -Expand FullName


foreach ($Private in $PrivateClasses){
Expand Down
12 changes: 6 additions & 6 deletions Tests/ClassUtils.Write-CUClassDiagram.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Describe "Testing Write-CUClassDiagram" {


$FolderPathFolder = Join-Path -Path $Testdrive -ChildPath "FolderPath"
$null = mkdir $FolderPathFolder -Force
$null = New-Item -ItemType Directory -Path $FolderPathFolder -Force
$Path_File1 = Join-Path -Path $FolderPathFolder -ChildPath "woop.ps1"
$File1 | Out-File -FilePath $Path_File1 -Force

Expand Down Expand Up @@ -122,15 +122,15 @@ Describe "Testing Write-CUClassDiagram" {
it "Parameter: -ExportPath: 'Should throw if folder does not exist'" {
$Guid = [Guid]::NewGuid().Guid
$NewFolder = Join-Path -Path $Testdrive -ChildPath $Guid
$null = mkdir $NewFolder
$null = New-Item -ItemType Directory -Path $NewFolder
$ret = Write-CUClassDiagram -Path $ClassScript -ExportFolder $NewFolder
$Ret.DirectoryName | should be $NewFolder
}

it "Parameter: -ExportPath: 'Should Create a graph in Other folder'" {
$Guid = [Guid]::NewGuid().Guid
$NewFolder = Join-Path -Path $Testdrive -ChildPath $Guid
$null = mkdir $NewFolder -force
$null = New-Item -ItemType Directory -Path $NewFolder -force
$ret = Write-CUClassDiagram -Path $ClassScript -ExportFolder $NewFolder
$Ret.DirectoryName | should be $NewFolder
}
Expand Down Expand Up @@ -190,7 +190,7 @@ Describe "Testing Write-CUClassDiagram" {
'@

$FolderPathFolder = Join-Path -Path $Testdrive -ChildPath "FolderPath"
$null = mkdir $FolderPathFolder -Force
$null = New-Item -ItemType Directory -Path $FolderPathFolder -Force
$Path_File1 = Join-Path -Path $FolderPathFolder -ChildPath "woop.ps1"
$File1 | Out-File -FilePath $Path_File1 -Force

Expand Down Expand Up @@ -218,15 +218,15 @@ Describe "Testing Write-CUClassDiagram" {
it "Parameter: -ExportPath: 'Should throw if folder does not exist'" {
$Guid = [Guid]::NewGuid().Guid
$NewFolder = Join-Path -Path $Testdrive -ChildPath $Guid
$null = mkdir $NewFolder -Force
$null = New-Item -ItemType Directory -Path $NewFolder -Force
$ret = Write-CUClassDiagram -Path $ClassScript -ExportFolder $NewFolder
$Ret.DirectoryName | should be $NewFolder
}

it "Parameter: -ExportPath: 'Should Create a graph in Other folder'" {
$Guid = [Guid]::NewGuid().Guid
$NewFolder = Join-Path -Path $Testdrive -ChildPath $Guid
$null = mkdir $NewFolder
$null = New-Item -ItemType Directory -Path $NewFolder
$ret = Write-CUClassDiagram -Path $ClassScript -ExportFolder $NewFolder
$Ret.DirectoryName | should be $NewFolder
}
Expand Down

0 comments on commit 942b924

Please sign in to comment.