mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 15:48:03 +00:00
Some checks are pending
CodeQL / Analyze (csharp) (push) Waiting to run
OpenAPI / OpenAPI - HEAD (push) Waiting to run
OpenAPI / OpenAPI - BASE (push) Waiting to run
OpenAPI / OpenAPI - Difference (push) Blocked by required conditions
OpenAPI / OpenAPI - Publish Unstable Spec (push) Blocked by required conditions
OpenAPI / OpenAPI - Publish Stable Spec (push) Blocked by required conditions
Tests / run-tests (macos-latest) (push) Waiting to run
Tests / run-tests (ubuntu-latest) (push) Waiting to run
Tests / run-tests (windows-latest) (push) Waiting to run
Project Automation / Project board (push) Waiting to run
Merge Conflict Labeler / Labeling (push) Waiting to run
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);
|
|
}
|
|
}
|