View ContractTest.cs
/** | |
* Copyright 2016 d-fens GmbH | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
View Should.ps1
help Should | |
function Should { | |
[CmdletBinding( | |
SupportsShouldProcess = $false | |
, | |
ConfirmImpact = 'Low' | |
)] | |
Param | |
( |
View TSGET.CMD
@ECHO OFF | |
SETLOCAL | |
FOR /F "tokens=* delims=?" %%I IN ('ECHO %0') DO @SET SCRIPTPATH=%%~dpI | |
FOR /F "tokens=* delims=?" %%I IN ('ECHO %SCRIPTPATH%') DO @SET SCRIPTPATH=%%~I | |
FOR /F "tokens=* delims=?" %%I IN ('ECHO %SCRIPTPATH%') DO @SET SCRIPTPATH=%%~sI | |
IF "\" EQU "%SCRIPTPATH:~-1%" SET SCRIPTPATH=%SCRIPTPATH:~0,-1% | |
IF "\" EQU "%SCRIPTPATH:~0,1%" ( | |
PUSHD "%SCRIPTPATH%" |
View --- README.md
- Mock Times/Exactly script under test MockTimesExactly.ps1
- Mock Times/Exactly Pester test script MockTimesExactly.Tests.ps1
- Mock Should BeOfType Pester test script MockBeOfType.Tests.ps1
View HashtableDuplicateKey.Tests.ps1
#Requires -Module Pester | |
#Requires -Version 3.0 | |
# see http://d-fens.ch/2015/06/28/bug-powershell-import-clixml-incorrectly-creates-hashtables-with-duplicate-keys/ for further explanation | |
$here = Split-Path -Parent $MyInvocation.MyCommand.Path | |
$ImportCliXmlDuplicateKeys = "{0}.xml" -f $MyInvocation.MyCommand.Name.Replace('.Tests.ps1', ''); | |
Describe -Tags "Test-ImportCliXml" "Test-ImportCliXml" { |
View Get-Functions.ps1
#Requires -Version 3 | |
# http://d-fens.ch/2015/04/26/nobrainer-enumerate-all-functions-in-a-powershell-script-file-via-ast | |
[CmdletBinding( | |
SupportsShouldProcess = $true | |
, | |
ConfirmImpact = 'Low' | |
, | |
DefaultParameterSetName = 'list' | |
)] | |
Param |