[IncludeHelper] Improvements and Fixing#57
Merged
Merged
Conversation
…and quote handling
… string[] to object[]
… debug section tests
…ingle line transcripts errors
| # We can use this Mock functions to mock the calls to this invokes that use a json to | ||
| # transfer an object as parameter. | ||
|
|
||
| function Reset-MockSaveParameterToVariable { |
| # $list | ConvertTo-CompleteResults -wordToComplete $wordToComplete | ||
| # } | ||
|
|
||
| function ConvertTo-CompleteResults{ |
| } | ||
| } | ||
|
|
||
| function remove-secrets { |
| $result = @(Stop-MyTranscript) | ||
|
|
||
| Assert-Count -Expected 1 -Presented $result | ||
| Assert-DbgMsg $result[0] "algoconall" $text2 |
|
|
||
| Invoke-PrivateContext { | ||
| param($Arguments) | ||
|
|
| process{ | ||
| # Encode the string to base64 | ||
| $ret = [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($Text)) | ||
| return $ret |
|
|
||
| } | ||
|
|
||
| function Invoke-MockSaveParameterToVariable{ |
| # When the parameters for an invoke is too big as string, we can use a json | ||
| # as a single parameter to hold all the parameters wanted. | ||
| # | ||
| # We can use this Mock functions to mock the calls to this invokes that use a json to |
…ommand construction
| return $header | ||
| } | ||
|
|
||
| function Remove-VersionHeader($content){ |
| @@ -0,0 +1,119 @@ | |||
| function Set-IncludeFileVersion{ | |||
| @@ -0,0 +1,119 @@ | |||
| function Set-IncludeFileVersion{ | |||
| @@ -0,0 +1,33 @@ | |||
| function Get-IncludeFileVersion{ | |||
|
|
||
| # Act | ||
| $result = Get-IncludeFileVersion -Path "TestFile.ps1" | ||
|
|
|
|
||
| $headerversion = 1 | ||
| $header = $script:HEADER_V1 | ||
|
|
|
|
||
| $headerversion = $headerversion | ||
| $header = $script:TEST_HEADER_V1 | ||
|
|
| Date = $Date | ||
| } | ||
| } | ||
|
|
| $headeersizeinlines = $script:TEST_HEADER_V1.Count | ||
|
|
||
| $content = Get-Content -Path $Path | Out-String | ||
| $json = Build-TestFileVersionJson $Version $Date $headerversion |
| $headerversion = 1 | ||
| $version = "1.0.0" | ||
| $date = "1975-02-18" | ||
| $json = Build-TestFileVersionJson $Version $Date $headerversion |
| $headerversion = 1 | ||
| $version = "1.0.0" | ||
| $date = "1975-02-18" | ||
| $json = Build-TestFileVersionJson $Version $Date $headerversion |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(mock): implement functions for mocking command parameters using JSON
feat(base64): add functions for converting to and from base64
feat(base64): add documentation for base64 conversion functions
refactor(logging): streamline logging functions and add secret removal
feat(Invoke-RestAPI): add support for HTTP methods and request body
feat(functionParameterHelper): add functions for argument completion and quote handling
refactor(Invoke-PrivateContext): change Arguments parameter type from string[] to object[]
chore: remove sync scripts for TestingHelper templates
fix(Test-MyDebug): improve testSection function and enhance section handling
test(MyWrite): update transcript handling for consistency and add new debug section tests
fix(Test_CopyIncludeToWorkspace): update test name for consistency
fix(Find-ModuleRootPath): improve path resolution and handling of module names
feat(fileversion): implement Update-VersionToFile function for version management
fix(transcript): use Stop-MyTranscript with array to avoid empty or single line transcripts errors
fix(Test_GetIncludeSystemFiles): comment out unused sync files
fix(Find-ModuleRootPath): copy module.heler.ps1 for consistency include and test