Skip to content
Merged
1 change: 1 addition & 0 deletions .copilot/skills/apex-migration/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ using var testContext = new ApexTestContext(VisualStudio, ProjectTemplate.NetCor
- Get PMC console via `GetConsole(testContext.Project)` helper method in the test class.
- Don't use the method-delegates-to-async-helper pattern unless the helper is actually called from
multiple classes. Inline the test logic directly in the test method.
- Do NOT add "Migrated from" comments in the test code. The PR description tracks the mapping — the code should stand on its own without referencing the old PS test.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some things like this one seem relevant to the entire repo, and other skills. Can we have the skill look at common guidelines for the repo?


## Tests that should NOT be migrated

Expand Down
64 changes: 0 additions & 64 deletions test/EndToEnd/tests/FindPackageTest.ps1
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
function Test-FindPackageByIdjQuery {
# Act
$packages = Find-Package jQuery

# Assert
Assert-True $packages.Count -gt 0 "Find-Package cmdlet does not returns any package"
}

function Test-FindPackageByIdMVC {
# Act
$packages = Find-Package microsoft.aspnet.mvc

# Assert
Assert-True $packages.Count -gt 0 "Find-Package cmdlet does not returns any package"
}

function Test-FindPackageByIdaspnet {
# Act
$packages = Find-Package aspnet

# Assert
Assert-True $packages.Count -gt 0 "Find-Package cmdlet does not returns any package"
}

# As of now Find-Package does not suport wildcard yet.
# TODO: Uncomment the test when the feature is implemented.
function FindPackageByIdWildcard {
Expand All @@ -33,46 +9,6 @@ function FindPackageByIdWildcard {
Assert-True $packages.Count -gt 0 "Find-Package cmdlet does not returns any package"
}

function Test-FindPackageByIdAndVersion {
# Act
$packages = Find-Package entityframework -version 6.1.2
$version = [NuGet.Versioning.NuGetVersion]::Parse("6.1.2")

# Assert
Assert-True $packages[0].Versions[0] -eq $version
Assert-True $packages[0].Id -eq "EntityFramework"
}

function Test-FindPackageByIdAndPrereleaseVersion {
[SkipTest('https://github.com/NuGet/Home/issues/8496')]
param()

# Act 1
$packages = Find-Package TestPackage.AlwaysPrerelease

# Assert 1
Assert-Null $packages

# Act 2
$packages = Find-Package TestPackage.AlwaysPrerelease -Pre

# Assert 2
Assert-True $packages[0].Count -ne 0
Assert-True $packages[0].Id -eq TestPackage.AlwaysPrerelease
Assert-True $packages[0].Versions[0].ToString() -eq "5.0.0-beta"
}


function Test-FindPackageByIdWithAllVersions {
# Act
$packages = Find-Package elmah.io -allversions

# Assert
Assert-True $packages[0].Count -gt 1
Assert-True $packages[0].Id -eq elmah.io
Assert-True $packages[0].Versions.Count -gt 4
}

function Test-FindPackageByIdWithFirstAndSkip {
[SkipTest('https://github.com/NuGet/Home/issues/8496')]
param()
Expand Down
36 changes: 0 additions & 36 deletions test/EndToEnd/tests/GetPackageTest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,6 @@ function Test-GetPackageRetunsMoreThanServerPagingLimit {
}


function Test-GetPackageWithoutOpenSolutionThrows {
Assert-Throws { Get-Package } "The current environment doesn't have a solution open."
}

function Test-GetPackageWithUpdatesListsUpdates {
# Arrange
$p = New-ConsoleApplication

# Act
Install-Package NuGet.Core -Version 1.6.0 -Project $p.Name
Install-Package NuGet.CommandLine -Version 1.6.0 -Project $p.Name
$packages = Get-Package -Updates

# Assert
Assert-AreEqual 2 $packages.Count
}

function Test-GetPackageCollapsesPackageVersionsForListAvailable {
[SkipTest('https://github.com/NuGet/Home/issues/8849')]
param()
Expand Down Expand Up @@ -68,25 +51,6 @@ function GetPackageAcceptsAllAsSourceName {
Assert-True (1 -le $p.Count)
}

function Test-GetPackagesWithNoUpdatesReturnPackagesWithIsUpdateNotSet {
# Arrange & Act
$package = Get-Package -ListAvailable -First 1

# Assert
Assert-NotNull $package
Assert-False $package.IsUpdate
}

function Test-GetPackageDoesNotThrowIfSolutionIsTemporary {
param($context)

# Arrange
New-TextFile

# Act and Assert
Assert-Throws { Get-Package } "Solution is not saved. Please save your solution before managing NuGet packages."
}

function Test-GetPackageUpdatesAfterSwitchToSourceThatDoesNotContainInstalledPackageId
{
[SkipTest('https://github.com/NuGet/Home/issues/10254')]
Expand Down
Loading
Loading