scriptclass

0.14.0

Class definition extensions for PowerShell's object-based type system

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name scriptclass -RequiredVersion 0.14.0

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name scriptclass -Version 0.14.0

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) 2018 Adam Edwards.

Package Details

Author(s)

  • Adam Edwards

Tags

class object PSCustomObject

Cmdlets

add-scriptclass import-assembly import-script invoke-method Mock-ScriptClassMethod new-scriptobject New-ScriptObjectMock test-scriptobject Unmock-ScriptClassMethod

Functions

=> ::>

Dependencies

This module has no dependencies.

Release Notes

# ScriptClass 0.14.0 Release Notes

In addition to fixes and minor improvements below, this release adds support for mocking -- you can now mock `ScriptClass` methods to easily develop comprehensive unit tests for `ScriptClass` code.

## New features

* Add `Mock-ScriptClassMethod` cmdlet to enable mocking via the [Pester](https:/github.com/pester/pester) test framework
* Add `Unmock-ScriptClassMethod` cmdlet to remove mocks added by `Mock-ScriptClassMethod`
* Add `New-ScriptObjectMock` cmdlet to created mocked objects for unit testing compatible with the other mock cmdlets in this module
* Add `GetScriptHashCode` method to ScriptClass objects to return unique hash codes since GetHashCode hashes objects of the same class to the same value

## Fixed defects

* Fixed inability to use a parameter named 'method' in a ScriptClass object method due to name collision
* Object pollution: Removed leaked 'input' static property and '__staticBlockVariablesToRemove' instance property
* Fixed pollution of error streams with internal errors that were handled and should not be surfaced outside ScriptClass

FileList

Version History

Version Downloads Last updated
0.20.3 2,989 1/21/2023
0.20.2 3,279 6/20/2020
0.20.1 4,393 9/22/2019
0.20.0 226 9/20/2019
0.16.0 1,054 2/3/2019
0.15.0 80 1/13/2019
0.14.2 79 1/6/2019
0.14.1 44 1/5/2019
0.14.0 (current version) 41 1/2/2019
0.13.7 353 8/16/2018
0.13.6 130 7/1/2018
0.12.10 159 2/14/2018
0.12.9 47 2/14/2018
0.12.8 41 2/12/2018
0.12.6 30 2/11/2018
0.12.5 38 2/11/2018
0.12.4 40 2/10/2018
0.12.2 45 2/8/2018
Show less