@@ -63,7 +63,7 @@ public void NewBatchTaskShouldHaveExpectedMandatoryProperties()
63
63
64
64
cmdlet . JobId = "job-1" ;
65
65
66
- Assert . Throws < ArgumentNullException > ( ( ) => cmdlet . ExecuteCmdlet ( ) ) ;
66
+ var e = Assert . Throws < ArgumentNullException > ( ( ) => cmdlet . ExecuteCmdlet ( ) ) ;
67
67
68
68
cmdlet . Id = "testTask" ;
69
69
@@ -78,9 +78,11 @@ public void NewBatchTaskShouldHaveExpectedMandatoryProperties()
78
78
cmdlet . ExecuteCmdlet ( ) ;
79
79
}
80
80
81
- [ Fact ]
81
+ [ Theory ]
82
+ [ InlineData ( "cmd /c echo hello" ) ]
83
+ [ InlineData ( "" ) ]
82
84
[ Trait ( Category . AcceptanceType , Category . CheckIn ) ]
83
- public void NewBatchTaskParametersGetPassedToRequestTest ( )
85
+ public void NewBatchTaskParametersGetPassedToRequestTest ( string commandline )
84
86
{
85
87
BatchAccountContext context = BatchTestHelpers . CreateBatchContextWithKeys ( ) ;
86
88
cmdlet . BatchContext = context ;
@@ -90,7 +92,7 @@ public void NewBatchTaskParametersGetPassedToRequestTest()
90
92
cmdlet . AffinityInformation = new PSAffinityInformation ( "affinityValue" ) ;
91
93
cmdlet . DisplayName = "display name" ;
92
94
cmdlet . Constraints = new PSTaskConstraints ( TimeSpan . FromHours ( 1 ) , TimeSpan . FromDays ( 2 ) , 5 ) ;
93
- cmdlet . CommandLine = "cmd /c echo hello" ;
95
+ cmdlet . CommandLine = commandline ;
94
96
cmdlet . EnvironmentSettings = new Dictionary < string , string > ( ) ;
95
97
cmdlet . EnvironmentSettings . Add ( "env1" , "value1" ) ;
96
98
cmdlet . MultiInstanceSettings = new PSMultiInstanceSettings ( "cmd /c echo coordinating" , 3 )
0 commit comments