| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
James Truher (@JamesWTruher) Could you please review. |
Sorry, something went wrong.
There was a problem hiding this comment.
Half way through reviewing
Sorry, something went wrong.
| BeforeAll { | ||
| $restoreLocation = Get-Location | ||
|
|
||
| $DirSep = [io.path]::DirectorySeparatorChar |
There was a problem hiding this comment.
| $DirSep = [io.path]::DirectorySeparatorChar | |
| $DirSep = [IO.Path]::DirectorySeparatorChar |
Sorry, something went wrong.
There was a problem hiding this comment.
Done.
Sorry, something went wrong.
| It "Get-ChildItem -Path -Force" { | ||
| $result = Get-ChildItem -Path $rootDir -Force | ||
| $result.Count | Should -Be 5 | ||
| $result | Where-Object Name -eq "filehidden1.doc" | Should -Not -BeNullOrEmpty |
There was a problem hiding this comment.
| $result | Where-Object Name -eq "filehidden1.doc" | Should -Not -BeNullOrEmpty | |
| $result.Name | Should -Contain "filehidden1.doc" |
Sorry, something went wrong.
There was a problem hiding this comment.
Done.
Sorry, something went wrong.
| $result = Get-ChildItem -Path $rootDir -Name -Force | ||
| $result.Count | Should -Be 5 | ||
| $result | Should -BeOfType [string] | ||
| $result | Where-Object { $_ -eq "filehidden1.doc" } | Should -Not -BeNullOrEmpty |
There was a problem hiding this comment.
| $result | Where-Object { $_ -eq "filehidden1.doc" } | Should -Not -BeNullOrEmpty | |
| $result.Name | Should -Contain "filehidden1.doc" |
Sorry, something went wrong.
There was a problem hiding this comment.
Done.
Sorry, something went wrong.
| It "Get-ChildItem -Path -Recurse -Hidden" { | ||
| $result = Get-ChildItem -Path $rootDir -Recurse -Hidden | ||
| $result.Count | Should -Be 4 | ||
| $result | Where-Object { $_.Name -eq "filehidden1.doc" -and $_.psobject.TypeNames[0] -eq "System.IO.FileInfo"} | Should -Not -BeNullOrEmpty |
There was a problem hiding this comment.
| $result | Where-Object { $_.Name -eq "filehidden1.doc" -and $_.psobject.TypeNames[0] -eq "System.IO.FileInfo"} | Should -Not -BeNullOrEmpty | |
| $result.Where{ $_.Name -eq "filehidden1.doc"} | Should -BeOfType [System.IO.FileInfo] |
Same for below
Sorry, something went wrong.
There was a problem hiding this comment.
Done.
Sorry, something went wrong.
Sorry, last commit is large (include style changes too). |
Sorry, something went wrong.
|
|
||
| Set-Location $rootDir | ||
|
|
||
| New-Item -Path "file1.txt" -ItemType File > $null |
There was a problem hiding this comment.
Would it be better to have the filenames in a hashtable with their attribute so that you can verify the filenames are returned later in the tests? Then you could also just loop through the hashtable to create the files instead of having separate lines.
Sorry, something went wrong.
There was a problem hiding this comment.
I see your point but I don't want complicate the test code because (1) there are issues we want to fix in near future, (2) there are issues we want to fix in FileSystem provider V2 future - so simple linear tests will simplify our work in future.
Sorry, something went wrong.
|
Steve Lee (@SteveL-MSFT) Please continue your review. |
Sorry, something went wrong.
|
Steve Lee (@SteveL-MSFT) Please continue your review. |
Sorry, something went wrong.
|
🎉v7.1.0-preview.1 has been released which incorporates this pull request.:tada: Handy links: |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
Add new tests for better code coverage in SessionStateContainer.cs and FileSystemProvider.cs.
PR Context
I prepare a code to address issue #9119 but we have not tests to cover the code paths at all. To avoid regressions we should merge the new tests before new code will be pulled.
Some bugs (#9126 and #3304) was discovered, the new tests was marked as pending.
PR Checklist