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

Add new tests to the module #142

Merged
merged 22 commits into from Jun 24, 2017
Merged

Add new tests to the module #142

merged 22 commits into from Jun 24, 2017

Conversation

lipkau
Copy link
Member

@lipkau lipkau commented Jun 23, 2017

Description

This branch add tests for:

  • every function must have at least as many examples as it has ParameterSetNames
  • ensures PSJira objects have a custom .ToString() method (common mistake)
  • Use PSScriptAnalyzer to test the code for common practices. The rules with most impact were:
    • $null must be on the lest side when using it in a comparison rule
    • unused variables should be removed rule
    • state changing functions should support ShouldProcess rule

To satisfy these new Tests, this PR also:

  • implements .ToString() to PSJira objects that were missing them
  • removes unused variables
  • enhances the examples in the help of functions
  • added SupportsShouldProcess to state modifying function
  • renamed ConvertTo-Json2 internal functions

Motivation and Context

Enforce a better and more uniform coding style
closes #95

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • I have added Pester Tests that describe what my changes should do.
  • I have updated the documentation accordingly. still to come

@lipkau lipkau added this to the v1.3 milestone Jun 23, 2017
@lipkau lipkau self-assigned this Jun 23, 2017
@lipkau lipkau requested review from replicaJunction and Dejulia489 and removed request for replicaJunction June 23, 2017 08:05
@lipkau
Copy link
Member Author

lipkau commented Jun 24, 2017

Merging branch before any review was done.
Please comment here (or open a new issue) for changes/bugs/requests.

@lipkau lipkau merged commit bda7a17 into AtlassianPS:dev Jun 24, 2017
@lipkau lipkau deleted the feature/CmdletTests branch June 24, 2017 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant