-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Showing
1 changed file
with
35 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,40 @@ | |
|
||
Describe (($MyInvocation.MyCommand.Name -split '\.')[-3]) { | ||
|
||
Context 'Integration Tests' { | ||
Write-Warning "$(Split-Path $PSCommandPath -Leaf): Test not implemented" | ||
BeforeAll { | ||
$collectionName = (Get-TfsTeamProjectCollection -Current).Name | ||
} | ||
|
||
Context '__AllParameterSets' { | ||
# Get-TfsGroupMember | ||
# [-Group] <Object> | ||
# [[-Member] <string>] | ||
# [-Recurse] | ||
# [-Collection <Object>] | ||
# [-Server <Object>] [<CommonParameters>] | ||
|
||
It 'Should get all members of a server-level group' { | ||
$members = Get-TfsGroupMember -Group '[TEAM FOUNDATION]\Enterprise Service Accounts' | ||
$members | Should -BeOfType [Microsoft.VisualStudio.Services.Identity.Identity] | ||
$members.AccountName | Should -Be 'TeamFoundationService (TEAM FOUNDATION)' | ||
} | ||
|
||
It 'Should get all members of a collection-level group' { | ||
$members = Get-TfsGroupMember -Group "[$collectionName]\Project Collection Service Accounts" | ||
$members | Should -BeOfType [Microsoft.VisualStudio.Services.Identity.Identity] | ||
$members.AccountName | Should -Be 'Enterprise Service Accounts' | ||
} | ||
|
||
It 'Should get all members of a project-level group' { | ||
$members = Get-TfsGroupMember -Group "[$tfsProject]\Endpoint Administrators" | ||
$members | Should -BeOfType [Microsoft.VisualStudio.Services.Identity.Identity] | ||
$members.AccountName | Should -Be 'Project Administrators' | ||
} | ||
|
||
It 'Should get all members of a group recursively' { | ||
$members = Get-TfsGroupMember -Group "[$tfsProject]\Endpoint Administrators" -Recurse | ||
$members | Should -BeOfType [Microsoft.VisualStudio.Services.Identity.Identity] | ||
$members.AccountName | Sort-Object | Should -Be @('[email protected]', 'Project Administrators') | ||
} | ||
} | ||
} |