mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-24 02:02:29 -04:00
24 lines
476 B
C#
24 lines
476 B
C#
using System.IO;
|
|
using Xunit;
|
|
|
|
namespace Jellyfin.Extensions.Tests;
|
|
|
|
public static class FileHelperTests
|
|
{
|
|
[Fact]
|
|
public static void CreateEmpty_Valid_Correct()
|
|
{
|
|
var path = Path.Join(Path.GetTempPath(), Path.GetRandomFileName());
|
|
var fileInfo = new FileInfo(path);
|
|
|
|
Assert.False(fileInfo.Exists);
|
|
|
|
FileHelper.CreateEmpty(path);
|
|
|
|
fileInfo.Refresh();
|
|
Assert.True(fileInfo.Exists);
|
|
|
|
File.Delete(path);
|
|
}
|
|
}
|