mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
33 lines
No EOL
820 B
C#
33 lines
No EOL
820 B
C#
using LibHac.Common;
|
|
using LibHac.Fs;
|
|
using LibHac.Fs.Fsa;
|
|
using Xunit;
|
|
|
|
namespace LibHac.Tests.Fs.IFileSystemTestBase;
|
|
|
|
public abstract partial class IFileSystemTests
|
|
{
|
|
[Fact]
|
|
public void OpenFile_PathIsDirectory_ReturnsPathNotFound()
|
|
{
|
|
IFileSystem fs = CreateFileSystem();
|
|
|
|
fs.CreateDirectory("/dir");
|
|
|
|
using var file = new UniqueRef<IFile>();
|
|
Result res = fs.OpenFile(ref file.Ref, "/dir", OpenMode.All);
|
|
|
|
Assert.Result(ResultFs.PathNotFound, res);
|
|
}
|
|
|
|
[Fact]
|
|
public void OpenFile_PathDoesNotExist_ReturnsPathNotFound()
|
|
{
|
|
IFileSystem fs = CreateFileSystem();
|
|
|
|
using var file = new UniqueRef<IFile>();
|
|
Result res = fs.OpenFile(ref file.Ref, "/file", OpenMode.All);
|
|
|
|
Assert.Result(ResultFs.PathNotFound, res);
|
|
}
|
|
} |