-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4452d5b
commit fb7ec14
Showing
20 changed files
with
88 additions
and
54 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
12 changes: 0 additions & 12 deletions
12
Tasks/Common/MSBuildHelpers/Tests/Select-MSBuildPath.DoesNotFallbackFrom15.ps1
This file was deleted.
Oops, something went wrong.
This file contains 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
16 changes: 16 additions & 0 deletions
16
Tasks/Common/MSBuildHelpers/Tests/Select-MSBuildPath.FallsBackFrom15.ps1
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[cmdletbinding()] | ||
param() | ||
|
||
# Arrange. | ||
. $PSScriptRoot\..\..\..\..\Tests\lib\Initialize-Test.ps1 | ||
Microsoft.PowerShell.Core\Import-Module $PSScriptRoot\.. | ||
Register-Mock Write-Warning | ||
Register-Mock Get-MSBuildPath { 'Some resolved location' } -- -Version '14.0' -Architecture 'Some architecture' | ||
|
||
# Act. | ||
$actual = Select-MSBuildPath -Method 'Version' -Location '' -PreferredVersion '15.0' -Architecture 'Some architecture' | ||
|
||
# Assert. | ||
Assert-WasCalled Write-Warning | ||
Assert-WasCalled Get-MSBuildPath -Times 2 | ||
Assert-AreEqual -Expected 'Some resolved location' -Actual $actual |
This file contains 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
16 changes: 16 additions & 0 deletions
16
Tasks/Common/MSBuildHelpers/Tests/Select-MSBuildPath.FallsForwardFrom14.ps1
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[cmdletbinding()] | ||
param() | ||
|
||
# Arrange. | ||
. $PSScriptRoot\..\..\..\..\Tests\lib\Initialize-Test.ps1 | ||
Microsoft.PowerShell.Core\Import-Module $PSScriptRoot\.. | ||
Register-Mock Write-Warning | ||
Register-Mock Get-MSBuildPath { 'Some resolved location' } -- -Version '15.0' -Architecture 'Some architecture' | ||
|
||
# Act. | ||
$actual = Select-MSBuildPath -Method 'Version' -Location '' -PreferredVersion '14.0' -Architecture 'Some architecture' | ||
|
||
# Assert. | ||
Assert-WasCalled Write-Warning | ||
Assert-WasCalled Get-MSBuildPath -Times 2 | ||
Assert-AreEqual -Expected 'Some resolved location' -Actual $actual |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
11 changes: 0 additions & 11 deletions
11
Tasks/VSBuild/Tests/Select-VSVersion.ErrorsIf15NotFound.ps1
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[CmdletBinding()] | ||
param() | ||
|
||
# Arrange. | ||
. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 | ||
. $PSScriptRoot\..\Select-VSVersion.ps1 | ||
Register-Mock Write-Warning | ||
Register-Mock Get-VSPath { "Some resolved location" } -- -Version '14.0' | ||
|
||
# Act. | ||
$actual = Select-VSVersion -PreferredVersion '15.0' | ||
|
||
# Assert. | ||
Assert-WasCalled Write-Warning | ||
Assert-WasCalled Get-VSPath -Times 2 | ||
Assert-AreEqual -Expected '14.0' -Actual $actual |
This file contains 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
16 changes: 16 additions & 0 deletions
16
Tasks/VSBuild/Tests/Select-VSVersion.FallsForwardFrom14.ps1
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[CmdletBinding()] | ||
param() | ||
|
||
# Arrange. | ||
. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 | ||
. $PSScriptRoot\..\Select-VSVersion.ps1 | ||
Register-Mock Write-Warning | ||
Register-Mock Get-VSPath { "Some resolved location" } -- -Version '15.0' | ||
|
||
# Act. | ||
$actual = Select-VSVersion -PreferredVersion '14.0' | ||
|
||
# Assert. | ||
Assert-WasCalled Write-Warning | ||
Assert-WasCalled Get-VSPath -Times 2 | ||
Assert-AreEqual -Expected '15.0' -Actual $actual |
This file contains 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
This file contains 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
This file contains 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
This file contains 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