Tests/PSModuleBuilder.Integration.Tests.ps1
write-host "should be doing testing here...." # function Get-StatusOfThings { # param([string]$path, [string]$module="") # Write-Host @" # ******* # * Module $module Contents: # * # "@ # Get-ChildItem "$path\$module" | Foreach-Object { # Write-Host " * - $($_.FullName)" # If (Test-Path $_.FullName -PathType Container){ # Get-ChildItem $_.FullName | %{ Write-Host " * - $($_.Name)" } # } # } # Write-Host @" # * # ******* # "@ # } # function Show-Everything { # param([string]$path, [string]$module="") # Get-ChildItem "$path\$module" -Recurse -Depth 3 | Foreach-Object { # If (Test-Path $_.FullName -PathType Container){ # Write-Host @" # Inside of $($_.Name)/ Directory... # "@ # } # Write-Host @" # ******* # * File $($_.BaseName)\$($_.Name) Contents: # * # "@ # Get-Content $_.FullName # Write-Host @" # * # ******* # "@ # } # } # Write-Host @" # ********************************** # Starting the create phase... # ********************************** # "@ # return # Write-Host "Importing Public function files..." # Get-ChildItem "$PSscriptRoot\..\Public\" -Exclude "*.Tests.ps1" | Foreach-Object { # . $_.FullName # } # Write-Host "Getting the default module builder path..." # $mbPath = Get-PsModuleBuilderPath # Write-Host "PsModuleBuilderPath: $mbPath" # Write-Host "Setting the module builder path to an accessible location..." # New-Item -Path "IntegrationTesting\Modules" -ItemType Directory -Force | Out-Null # Set-PsModuleBuilderPath "IntegrationTesting\Modules" # Write-Host "Getting the newly set module builder path..." # $mbPath = Get-PsModuleBuilderPath # Write-Host "PsModuleBuilderPath: $mbPath" # Get-StatusOfThings $mbPath # $module = "IntegrationTestModule" # Write-Host "WhatIf: Creating new module $module..." # New-PsModule $module -WhatIf # Write-Host "Creating new module $module..." # New-PsModule $module # Get-StatusOfThings $mbPath $module # $func = "Write-IntegrationStuff" # Write-Host "WhatIf: Creating new function in for $($module): $func..." # New-PsFunction $module $func "Public" -WhatIf # Write-Host "Creating new function in for $($module): $func..." # New-PsFunction $module $func "Public" # Get-StatusOfThings $mbPath $module # $funcInternal = "Write-InternalIntegrationStuff" # Write-Host "WhatIf: Creating new internal function in for $($module): $funcInternal..." # New-PsFunction $module $funcInternal "Internal" -WhatIf # Write-Host "Creating new internal function in for $($module): $funcInternal..." # New-PsFunction $module $funcInternal "Internal" # Get-StatusOfThings $mbPath $module # $scriptName = "Write-ScriptStuff" # Write-Host "WhatIf: Creating new script: $scriptName..." # New-PsScript $scriptName -WhatIf # Write-Host "Creating new script: $scriptName..." # New-PsScript $scriptName # Get-StatusOfThings $mbPath $module # Write-Host @" # ********************************** # Show Everything... # ********************************** # "@ # # Show-Everything $mbPath $module # Write-Host @" # ********************************** # Starting the clean up phase... # ********************************** # "@ # Get-StatusOfThings $mbPath $module # Write-Host "WhatIf: Removing function in for $($module): $func..." # Remove-PsFunction $module $func -WhatIf # Write-Host "Removing function in for $($module): $func..." # Remove-PsFunction $module $func # Get-StatusOfThings $mbPath $module # Write-Host "WhatIf: Removing internal function in for $($module): $funcInternal..." # Remove-PsFunction $module $funcInternal -WhatIf # Write-Host "Removing internal function in for $($module): $funcInternal..." # Remove-PsFunction $module $funcInternal # Get-StatusOfThings $mbPath $module # Write-Host "WhatIf: Removing new module $module..." # Remove-PsModule $module -WhatIf # Write-Host "Removing new module $module..." # Remove-PsModule $module # Get-StatusOfThings $mbPath # # Write-Host "WhatIf: Removing script: $scriptName..." # # Remove-PsScript $scriptName -WhatIf # # Write-Host "Removing script: $scriptName..." # # Remove-PsScript $scriptName # # Get-StatusOfThings $mbPath $module # Write-Host @" # ********************************** # Finished the script! # ********************************** # "@ |