Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xActiveDirectory: Replace helper function ThrowInvalidOperationError #316

Closed
johlju opened this issue Jun 5, 2019 · 1 comment · Fixed by #418
Closed

xActiveDirectory: Replace helper function ThrowInvalidOperationError #316

johlju opened this issue Jun 5, 2019 · 1 comment · Fixed by #418
Assignees
Labels
enhancement The issue is an enhancement request. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub

Comments

@johlju
Copy link
Member

johlju commented Jun 5, 2019

The helper function ThrowInvalidOperationError should be replaced to use the new helper function New-InvalidOperationException.

Unit tests should also be replaced to test the actual error message, like below.

https://github.com/PowerShell/xActiveDirectory/blob/91a53534aa3708ffbb461537f502721fad3ac0ae/Tests/Unit/MSFT_xADComputer.Tests.ps1#L921

@johlju johlju added enhancement The issue is an enhancement request. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub help wanted The issue is up for grabs for anyone in the community. labels Jun 5, 2019
@johlju johlju changed the title xActivieDirectory: Replace helper function ThrowInvalidOperationError xActiveDirectory: Replace helper function ThrowInvalidOperationError Jun 5, 2019
@johlju johlju added in progress The issue is being actively worked on by someone. and removed help wanted The issue is up for grabs for anyone in the community. labels Jul 7, 2019
@johlju johlju self-assigned this Jul 7, 2019
@johlju
Copy link
Member Author

johlju commented Jul 7, 2019

I will run with this one.

johlju added a commit to johlju/ActiveDirectoryDsc that referenced this issue Jul 7, 2019
- Removed the helper function `ThrowInvalidOperationError` in favor of
  new helper functions for localization (issue dsccommunity#316).
- Cleaned up some minor style violations in the code.
johlju added a commit to johlju/ActiveDirectoryDsc that referenced this issue Jul 9, 2019
- Removed the helper function `ThrowInvalidOperationError` in favor of
  new helper functions for localization (issue dsccommunity#316).
- Cleaned up some minor style violations in the code.
johlju added a commit that referenced this issue Jul 11, 2019
- Changes to xActiveDirectory
  - Removed the helper function `ThrowInvalidOperationError` and `ThrowInvalidArgumentError` in favor of the [new helper functions for localization](https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#helper-functions-for-localization) (issue #316, issue #317).
  - Cleaned up some minor style violations in the code.
  - Fixed an issue that the helper function `Add-ADCommonGroupMember` was
    not outputting the correct group name in a verbose message and in an
    error message.
- xADDomain
  - Updated tests and replaced `Write-Error` with `throw`
    (issue #332).
- Changes to xADRecycleBin
  - Updated tests and remove unnecessary mocks of `Write-Error`.
@johlju johlju removed the in progress The issue is being actively worked on by someone. label Jul 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant