@@ -144,7 +144,6 @@ describe('CodeCoveragePublisherTests', function() {
144
144
var codeCoveragePublisher = new ccp . CodeCoveragePublisher ( testExecutionContext , command , jacocoSummaryReader ) ;
145
145
codeCoveragePublisher . publishCodeCoverageSummary ( ) . then ( function ( result ) {
146
146
assert ( testExecutionContext . service . jobsCompletedSuccessfully ( ) , 'CodeCoveragePublish Task Failed! Details : ' + testExecutionContext . service . getRecordsString ( ) ) ;
147
- assert ( result ) ;
148
147
done ( ) ;
149
148
} ,
150
149
function ( err ) {
@@ -187,7 +186,6 @@ describe('CodeCoveragePublisherTests', function() {
187
186
188
187
codeCoveragePublisher . publishCodeCoverageSummary ( ) . then ( function ( result ) {
189
188
assert ( testExecutionContext . service . jobsCompletedSuccessfully ( ) , 'CodeCoveragePublish Task Failed! Details : ' + testExecutionContext . service . getRecordsString ( ) ) ;
190
- assert ( result ) ;
191
189
done ( ) ;
192
190
} ,
193
191
function ( err ) {
@@ -240,17 +238,18 @@ describe('CodeCoveragePublisherTests', function() {
240
238
it ( 'codecoverage.publish : publish jacoco summary when there is no code coverage data' , function ( done ) {
241
239
this . timeout ( 2000 ) ;
242
240
243
- var properties : { [ name : string ] : string } = { "summaryfile" : emptyJacocoSummaryFile , "codecoveragetool" : "JaCoCo" } ;
241
+ var properties : { [ name : string ] : string } = { "summaryfile" : emptyJacocoSummaryFile , "codecoveragetool" : "JaCoCo" , "reportdirectory" : "" , "additionalcodecoveragefiles" : "" } ;
244
242
var command : cm . ITaskCommand = new tc . TestCommand ( null , null , null ) ;
245
243
command . properties = properties ;
246
- var jacocoSummaryReader = new csr . JacocoSummaryReader ( command ) ;
247
- 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 ) ;
248
247
249
248
var codeCoveragePublishCommand = new cpc . CodeCoveragePublishCommand ( testExecutionContext , command ) ;
250
249
codeCoveragePublishCommand . runCommandAsync ( ) . then ( function ( result ) {
251
250
assert ( testExecutionContext . service . jobsCompletedSuccessfully ( ) , 'CodeCoveragePublish Task Failed! Details : ' + testExecutionContext . service . getRecordsString ( ) ) ;
252
- assert ( ! result ) ;
253
- assert ( testExecutionContext . service . containerItems . length == 0 ) ;
251
+ assert ( result ) ;
252
+ assert ( testExecutionContext . service . containerItems . length == 1 ) ;
254
253
done ( ) ;
255
254
} ,
256
255
function ( err ) {
@@ -261,17 +260,18 @@ describe('CodeCoveragePublisherTests', function() {
261
260
it ( 'codecoverage.publish : publish cobertura summary when there is no code coverage data' , function ( done ) {
262
261
this . timeout ( 2000 ) ;
263
262
264
- var properties : { [ name : string ] : string } = { "summaryfile" : emptyCoberturaSummaryFile , "codecoveragetool" : "cobertura" } ;
263
+ var properties : { [ name : string ] : string } = { "summaryfile" : emptyCoberturaSummaryFile , "codecoveragetool" : "cobertura" , "reportdirectory" : "" , "additionalcodecoveragefiles" : "" } ;
265
264
var command : cm . ITaskCommand = new tc . TestCommand ( null , null , null ) ;
266
265
command . properties = properties ;
267
- var coberturaSummaryReader = new csr . CoberturaSummaryReader ( command ) ;
268
- 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 ) ;
269
269
270
270
var codeCoveragePublishCommand = new cpc . CodeCoveragePublishCommand ( testExecutionContext , command ) ;
271
271
codeCoveragePublishCommand . runCommandAsync ( ) . then ( function ( result ) {
272
272
assert ( testExecutionContext . service . jobsCompletedSuccessfully ( ) , 'CodeCoveragePublish Task Failed! Details : ' + testExecutionContext . service . getRecordsString ( ) ) ;
273
- assert ( ! result ) ;
274
- assert ( testExecutionContext . service . containerItems . length == 0 ) ;
273
+ assert ( result ) ;
274
+ assert ( testExecutionContext . service . containerItems . length == 1 ) ;
275
275
done ( ) ;
276
276
} ,
277
277
function ( err ) {
0 commit comments