Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
/ NuGet.Jobs Public archive

Commit

Permalink
More granular method call verification.
Browse files Browse the repository at this point in the history
  • Loading branch information
agr committed Jun 15, 2019
1 parent 0d16837 commit 49040a2
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,19 @@ public async Task MarksPackageStatusBasedOnValidatorResults(
Times.Never);
}

if (validation != ValidationStatus.Failed)
{
PackageFileServiceMock.Verify(
x => x.DeletePackageForValidationSetAsync(ValidationSet),
Times.Never);
}
else
{
PackageFileServiceMock.Verify(
x => x.DeletePackageForValidationSetAsync(ValidationSet),
Times.Once);
}

TelemetryServiceMock
.Verify(ts => ts.TrackTotalValidationDuration(It.IsAny<TimeSpan>(), It.IsAny<bool>()), Times.Once());
Assert.InRange(duration, before - ValidationSet.Created, after - ValidationSet.Created);
Expand Down

0 comments on commit 49040a2

Please sign in to comment.