Mineplex2018-withcommit/Website/packages/MvcScaffolding.1.0.7/tools/ActionWithUnitTest/MvcScaffolding.ActionWithUnitTest.ps1

16 lines
1.0 KiB
PowerShell
Raw Normal View History

2013-08-27 17:14:08 +02:00
[T4Scaffolding.Scaffolder(Description = "Creates an action method, view model, view, and unit test stub")][CmdletBinding()]
param(
[parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)][string]$Controller,
[parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)][string]$Action,
[string]$ViewModel,
[switch]$WithViewModel,
[switch]$Post,
[string]$Project,
[string]$CodeLanguage,
[string[]]$TemplateFolders,
[switch]$Force = $false
)
$actionScaffoldResult = Scaffold MvcScaffolding.Action -Controller $Controller -Action $Action -ViewModel $ViewModel -WithViewModel:$WithViewModel -Post:$Post -Project $Project -CodeLanguage $CodeLanguage -OverrideTemplateFolders $TemplateFolders -Force:$Force
Scaffold MvcScaffolding.ActionUnitTest -Controller $actionScaffoldResult.Controller.FullName -Action $actionScaffoldResult.ActionMethod -ViewModel $actionScaffoldResult.ViewModel.FullName -Project $Project -CodeLanguage $CodeLanguage -OverrideTemplateFolders $TemplateFolders -Force:$Force