-
Notifications
You must be signed in to change notification settings - Fork 0
/
work.ps1
32 lines (32 loc) · 955 Bytes
/
work.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
param(
[ValidateSet('work','netlibs','soalayer')][string]$proj='work',
[switch]$build,
[string]$class,
[string]$name
)
if($name -eq '' -or $class -eq ''){
'work tool test driven your project item'
return;
}
[string]$workDir = Split-Path -Parent $PSScriptRoot
[string]$proj_path=''
[string]$default_namespace=''
switch($proj){
"work" {
$proj_path="$workDir\bofu\Bizallview.Test\Bizallview.Test.csproj"
$default_namespace="Bizallview.Test"
}
"netlibs" {
$proj_path="$workDir\core\Netlibs.Test\Netlibs.Test.csproj"
$default_namespace="Netlibs.Test"
}
"soalayer" {
$proj_path="$workDir\soa\SoaLayer.Test\SoaLayer.Test.csproj"
$default_namespace="SoaLayer.Test"
}
}
if($build){
dotnet test --filter "Name=$name&ClassName=$default_namespace.$class" --logger 'console;verbosity=detailed' $proj_path
}else{
dotnet test --filter "Name=$name&ClassName=$default_namespace.$class" --logger 'console;verbosity=detailed' --no-build $proj_path
}