scriptclass
0.14.0
Class definition extensions for PowerShell's object-based type system
Installation Options
Owners
Copyright
(c) 2018 Adam Edwards.
Package Details
Author(s)
- Adam Edwards
Tags
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
- scriptclass.nuspec
- scriptclass.psd1
- scriptclass.psm1
- src\assemblyhelper.ps1
- src\include.ps1
- src\Mock-ScriptClassMethod.ps1
- src\New-ScriptObjectMock.ps1
- src\scriptclass.ps1
- src\std.ps1
- src\Unmock-ScriptClassMethod.ps1
- src\mock\MethodMocker.ps1
- src\mock\MethodPatcher.ps1
- src\mock\PatchedClassMethod.ps1
- src\mock\PatchedObject.ps1
Version History
Version | Downloads | Last updated |
---|---|---|
0.20.3 | 6,379 | 1/21/2023 |
0.20.2 | 3,280 | 6/20/2020 |
0.20.1 | 4,395 | 9/22/2019 |
0.20.0 | 227 | 9/20/2019 |
0.16.0 | 1,055 | 2/3/2019 |
0.15.0 | 81 | 1/13/2019 |
0.14.2 | 80 | 1/6/2019 |
0.14.1 | 45 | 1/5/2019 |
0.14.0 (current version) | 42 | 1/2/2019 |
0.13.7 | 354 | 8/16/2018 |
0.13.6 | 131 | 7/1/2018 |
0.12.10 | 160 | 2/14/2018 |
0.12.9 | 48 | 2/14/2018 |
0.12.8 | 42 | 2/12/2018 |
0.12.6 | 31 | 2/11/2018 |
0.12.5 | 39 | 2/11/2018 |
0.12.4 | 41 | 2/10/2018 |
0.12.2 | 46 | 2/8/2018 |