@@ -238,17 +238,18 @@ describe('CodeCoveragePublisherTests', function() {
238
238
it ( 'codecoverage.publish : publish jacoco summary when there is no code coverage data' , function ( done ) {
239
239
this . timeout ( 2000 ) ;
240
240
241
- var properties : { [ name : string ] : string } = { "summaryfile" : emptyJacocoSummaryFile , "codecoveragetool" : "JaCoCo" } ;
241
+ var properties : { [ name : string ] : string } = { "summaryfile" : emptyJacocoSummaryFile , "codecoveragetool" : "JaCoCo" , "reportdirectory" : "" , "additionalcodecoveragefiles" : "" } ;
242
242
var command : cm . ITaskCommand = new tc . TestCommand ( null , null , null ) ;
243
243
command . properties = properties ;
244
- var jacocoSummaryReader = new csr . JacocoSummaryReader ( command ) ;
245
- testExecutionContext = new tec . TestExecutionContext ( new jobInf . TestJobInfo ( { } ) ) ;
244
+ var jobInfo = new jobInf . TestJobInfo ( { } ) ;
245
+ jobInfo . variables = { "agent.workingDirectory" : __dirname , "build.buildId" : "1" } ;
246
+ testExecutionContext = new tec . TestExecutionContext ( jobInfo ) ;
246
247
247
248
var codeCoveragePublishCommand = new cpc . CodeCoveragePublishCommand ( testExecutionContext , command ) ;
248
249
codeCoveragePublishCommand . runCommandAsync ( ) . then ( function ( result ) {
249
250
assert ( testExecutionContext . service . jobsCompletedSuccessfully ( ) , 'CodeCoveragePublish Task Failed! Details : ' + testExecutionContext . service . getRecordsString ( ) ) ;
250
- assert ( ! result ) ;
251
- assert ( testExecutionContext . service . containerItems . length == 0 ) ;
251
+ assert ( result ) ;
252
+ assert ( testExecutionContext . service . containerItems . length == 1 ) ;
252
253
done ( ) ;
253
254
} ,
254
255
function ( err ) {
@@ -259,17 +260,18 @@ describe('CodeCoveragePublisherTests', function() {
259
260
it ( 'codecoverage.publish : publish cobertura summary when there is no code coverage data' , function ( done ) {
260
261
this . timeout ( 2000 ) ;
261
262
262
- var properties : { [ name : string ] : string } = { "summaryfile" : emptyCoberturaSummaryFile , "codecoveragetool" : "cobertura" } ;
263
+ var properties : { [ name : string ] : string } = { "summaryfile" : emptyCoberturaSummaryFile , "codecoveragetool" : "cobertura" , "reportdirectory" : "" , "additionalcodecoveragefiles" : "" } ;
263
264
var command : cm . ITaskCommand = new tc . TestCommand ( null , null , null ) ;
264
265
command . properties = properties ;
265
- var coberturaSummaryReader = new csr . CoberturaSummaryReader ( command ) ;
266
- testExecutionContext = new tec . TestExecutionContext ( new jobInf . TestJobInfo ( { } ) ) ;
266
+ var jobInfo = new jobInf . TestJobInfo ( { } ) ;
267
+ jobInfo . variables = { "agent.workingDirectory" : __dirname , "build.buildId" : "1" } ;
268
+ testExecutionContext = new tec . TestExecutionContext ( jobInfo ) ;
267
269
268
270
var codeCoveragePublishCommand = new cpc . CodeCoveragePublishCommand ( testExecutionContext , command ) ;
269
271
codeCoveragePublishCommand . runCommandAsync ( ) . then ( function ( result ) {
270
272
assert ( testExecutionContext . service . jobsCompletedSuccessfully ( ) , 'CodeCoveragePublish Task Failed! Details : ' + testExecutionContext . service . getRecordsString ( ) ) ;
271
- assert ( ! result ) ;
272
- assert ( testExecutionContext . service . containerItems . length == 0 ) ;
273
+ assert ( result ) ;
274
+ assert ( testExecutionContext . service . containerItems . length == 1 ) ;
273
275
done ( ) ;
274
276
} ,
275
277
function ( err ) {
0 commit comments