Skip to content

Commit

Permalink
added return statement to psclassutils
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephanevg committed Mar 30, 2019
1 parent 5afaab1 commit 1cd70f0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
1 change: 1 addition & 0 deletions Code/Functions/Public/Write-CUClassDiagram.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ function Write-CUClassDiagram {
$Diagram.GetClassObjects()
$Diagram.CreateGraphVizDocument()
$Diagram.CreateDiagram()
return [System.IO.FileInfo]$Diagram.Path

}

Expand Down
8 changes: 4 additions & 4 deletions PSClassUtils/PSClassUtils.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: Stéphane van Gulick
#
# Generated on: 3/12/2019
# Generated on: 3/25/2019
#

@{
Expand Down Expand Up @@ -32,13 +32,13 @@ Copyright = '(c) 2018 TAAVAST3. All rights reserved.'
# Description of the functionality provided by this module
Description = 'Contains a set of utilities to work with Powershell Classes.'

# Minimum version of the PowerShell engine required by this module
# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '5.0'

# Name of the PowerShell host required by this module
# Name of the Windows PowerShell host required by this module
# PowerShellHostName = ''

# Minimum version of the PowerShell host required by this module
# Minimum version of the Windows PowerShell host required by this module
# PowerShellHostVersion = ''

# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
Expand Down
21 changes: 11 additions & 10 deletions PSClassUtils/PSClassUtils.psm1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Generated at 03/14/2019 01:51:27 by Stephane van Gulick
#Generated at 03/25/2019 10:37:11 by Stephane van Gulick
#Needed for 07_CUInterfaceAuthor

using namespace System.Collections.Generic
Expand Down Expand Up @@ -1106,7 +1106,7 @@ function Get-CUClass {
.OUTPUTS
Return type [CuClass]
.NOTES
Author: Stéphane van Gulick
Author: Stéphane van Gulick
Participate & contribute --> https://github.com/Stephanevg/PSClassUtils
#>

Expand Down Expand Up @@ -1246,7 +1246,7 @@ Function Get-CUClassConstructor {
.OUTPUTS
ClassConstructor
.NOTES
Author: Stéphane van Gulick
Author: Stéphane van Gulick
Version: 0.7.1
www.powershellDistrict.com
Report bugs or submit feature requests here:
Expand Down Expand Up @@ -1414,7 +1414,7 @@ Function Get-CUClassMethod {
.OUTPUTS
CUClassMethod
.NOTES
Author: Stéphane van Gulick
Author: Stéphane van Gulick
Version: 0.7.1
www.powershellDistrict.com
Report bugs or submit feature requests here:
Expand Down Expand Up @@ -1640,7 +1640,7 @@ function Get-CUCommands {
Get-CUCommands
.NOTES
Author: Stéphane van Gulick
Author: Stéphane van Gulick
#>
[CmdletBinding()]
Expand Down Expand Up @@ -1670,7 +1670,7 @@ Function Get-CUEnum{
.OUTPUTS
Classenum
.NOTES
Author: Stéphane van Gulick
Author: Stéphane van Gulick
Version: 0.2.0
.LINK
Expand Down Expand Up @@ -1876,7 +1876,7 @@ function Test-IsCustomType {

# Test-PowershellDynamicClass MyClass

# extrait et adapté de https://github.com/PowerShell/PowerShell-Tests
# extrait et adapté de https://github.com/PowerShell/PowerShell-Tests



Expand Down Expand Up @@ -2061,6 +2061,7 @@ function Write-CUClassDiagram {
$Diagram.GetClassObjects()
$Diagram.CreateGraphVizDocument()
$Diagram.CreateDiagram()
return [System.IO.FileInfo]$Diagram.Path

}

Expand Down Expand Up @@ -2180,7 +2181,7 @@ Function Write-CUPesterTest {
When Passthru is specified
[Directory.IO.FileInfo]
.NOTES
Author: Stéphane van Gulick
Author: Stéphane van Gulick
Version: 1.0.0
.LINK
https://github.com/Stephanevg/PsClassUtils
Expand Down Expand Up @@ -2525,11 +2526,11 @@ Function Write-CUPesterTest {
[void]$sb.AppendLine("# -- Assert")
[void]$sb.AppendLine("")
If ($Method.ReturnType -eq '[void]' -or $Null -eq $Method.ReturnType) {
[void]$sb.AppendLine("$MethodCall" + '| should be $null')
[void]$sb.AppendLine("$MethodCall" + '| Should -Be $null')
}
else {

[void]$sb.AppendLine("($MethodCall).GetType().Name | should be $ReturnType")
[void]$sb.AppendLine("($MethodCall).GetType().Name | Should -Be $ReturnType")
}


Expand Down

0 comments on commit 1cd70f0

Please sign in to comment.