Make GivenThatICopyLibraryAssets repeatable
This commit is contained in:
parent
79648f9ccb
commit
f277103831
1 changed files with 7 additions and 0 deletions
|
@ -60,6 +60,13 @@ namespace Microsoft.DotNet.Cli.Compiler.Common.Tests
|
|||
var mockedLibraryAssetFileName = $"{mockedLibraryAssetName}.dll";
|
||||
|
||||
var fakeFile = Path.Combine(AppContext.BaseDirectory, mockedLibraryAssetFileName);
|
||||
|
||||
if (File.Exists(fakeFile))
|
||||
{
|
||||
File.SetAttributes(fakeFile, FileAttributes.Normal);
|
||||
File.Delete(fakeFile);
|
||||
}
|
||||
|
||||
File.WriteAllText(fakeFile, mockedLibraryAssetName);
|
||||
|
||||
return new LibraryAsset(mockedLibraryAssetName, mockedLibraryAssetFileName, fakeFile);
|
||||
|
|
Loading…
Add table
Reference in a new issue