aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Extensions.Tests/FileHelperTests.cs
blob: fb6a5dd0acb9734ade109a5e3ca47ad53cc585ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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);
    }
}