Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PSClassUtils.psm1 and ClassUtils.Write-CUClassDiagram.Tests.ps1 for Linux support. #43

Merged
merged 1 commit into from
Oct 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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