LockFilePatcher should only patch when lock file has holes in it

If not, the export file is stale
This commit is contained in:
Mihai Codoban 2016-03-30 10:58:30 -07:00
parent 385a3d65da
commit d20e0d74f2
5 changed files with 74 additions and 1 deletions

View file

@ -52,6 +52,21 @@ namespace Microsoft.DotNet.ProjectModel.Tests
}
}
[Fact]
public void TestFragmentExistsButNoHolesInLockFile()
{
var lockFilePath = GetLockFilePath("valid_staleFragment");
var lockFile = LockFileReader.Read(lockFilePath);
var exportFile = lockFile.ExportFile;
exportFile.Should().BeNull();
lockFile.Targets.Count.Should().Be(1);
lockFile.Targets[0].Libraries.Count.Should().Be(0);
}
[Fact]
public void TestMissingExportFileThrows()
{