mirror of
https://github.com/ZuneDev/ZuneUIXTools.git
synced 2026-07-27 13:11:59 -07:00
Add prefix to test filenames
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using OwlCore.ComponentModel;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using PathIO = System.IO.Path;
|
||||
|
||||
namespace UIX.Test.Helpers;
|
||||
|
||||
@@ -21,8 +22,11 @@ internal class TempFile : IDisposable, IAsyncInit
|
||||
{
|
||||
_init = async delegate
|
||||
{
|
||||
var fileName = $"uixtest_{PathIO.GetRandomFileName()}";
|
||||
fileName = PathIO.ChangeExtension(fileName.Replace(".", ""), fileExtension);
|
||||
Path = PathIO.Combine(PathIO.GetTempPath(), fileName);
|
||||
|
||||
// Copy the test data to a temporary file because Iris can only load from a URI.
|
||||
Path = System.IO.Path.ChangeExtension(System.IO.Path.GetTempFileName(), fileExtension);
|
||||
await File.WriteAllBytesAsync(Path, data);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user