Updates the Test-Json cmdlet to use JsonSchema.Net instead of NJsonSchema in order to:
- use System.Text.Json instead of Newtonsoft
- support the latest JSON Schema drafts (up to 2020-12)
* Added SkipLast parameter set to Skip parameter and updated tests
* Using Should -BeExactly with string
* Update test/powershell/Modules/Microsoft.PowerShell.Utility/Select-Object.Tests.ps1
---------
Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
Co-authored-by: Travis Plunk <github@ez13.net>
* Fix constructing PSModulePath if a sub-path has trailing separator
* skip test on Linux
* Removed test as the system env var needs to be modified to repro
* Add test
* Fix test by comparing against incorrectly created path
* Update test to be cross platform
* Add `Get-SecureRandom` cmdlet
* update comments
* address Paul and Travis' comments
* Update test/powershell/Modules/Microsoft.PowerShell.Utility/Get-SecureRandom.Tests.ps1
Co-authored-by: James Truher [MSFT] <jimtru@microsoft.com>
* address codefactor
* address Ilya's feedback creating a base class for both cmdlets
* remove unused `using`
---------
Co-authored-by: James Truher [MSFT] <jimtru@microsoft.com>
* Added verbose TCP test logic
* Cleaned up output, removed source IP address
* Consolidated detailed output logic into ProcessConnectionByTCPPort()
* Updated existing tests with -Quiet switch
* Improved output formatting, changed logic to match
* Error handling and logic improvements
* Updated tests to match new output
* Updated logic, tcp tests now run once by default
* Moved TcpConnectionTestResult enum into TcpTestStatus class
* Removed unnecessary whitespace
* Wrapped TcpClient() in Using statement
* Appended missing period on comments
* Change TcpTestStatus to TcpPortStatus for better clarity
* Set default count back to 4
* Move stopwatch reset into finally block
* Change TcpConnectionTestResult.New to TcpConnectionTestResult.None
* Formatting fixes
* Increase column size for Result output
* Update logic for -quiet option
* Change "TestNum" property to "Id"
* Change Destination and DestinationAddress to Target and TargetAddress in TcpPortStatus
* Implement new form of using declaration
* Fix indentation
* Update output, improve logic and update tests
* Add CancellationToken to allow cancel before timeout
* Assign testResult.Connected to client.Connected
* Move TcpPortStatus object creation to after connection test
* Remove delay from final connection test in loop
* Move Count logic from ProcessConnectionByTCPPort into own function
* Fix small formatting error
* Add handling for TaskCanceledException
* Remove redundant CancellationToken getter
* Clean up handling of SocketException
* Increase readability of final loop check
* Remove unnecessary TimeSpan invocation
* Rename cancellationTokenSource to match convention
* Move SetCountForTcpTest() into BeginProcessing()
* Added nameof to Count check
* Removed explicit type declaration for TcpClient
* Move delay and timeout evaluation out of the cycle
* Remove redundant CancellationTokenSource
* Initialize detailed SwitchParameter
* Add check for Detailed parameter
* Remove redundant tests for non-detailed output
* Add return after first boolean output
* Update tests with new detailed parameter set
---------
Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
* Add prompt to fix conflicts
* Add function to backport all approved PRs
* Update tools/releaseTools.psm1
Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
* Update tools/releaseTools.psm1
---------
Co-authored-by: Dongbo Wang <dongbow@microsoft.com>