mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-07 11:12:27 +00:00
The Great Formatting of 2022
This commit is contained in:
parent
59cc7f02fb
commit
35f50f5f8c
162 changed files with 6609 additions and 6809 deletions
|
@ -4,58 +4,57 @@ using System.Text;
|
|||
using LBPUnion.ProjectLighthouse.Types.Files;
|
||||
using Xunit;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Tests
|
||||
namespace LBPUnion.ProjectLighthouse.Tests;
|
||||
|
||||
public class FileTypeTests
|
||||
{
|
||||
public class FileTypeTests
|
||||
[Fact]
|
||||
public void ShouldRecognizeLevel()
|
||||
{
|
||||
[Fact]
|
||||
public void ShouldRecognizeLevel()
|
||||
{
|
||||
LbpFile file = new(File.ReadAllBytes("ExampleFiles/TestLevel.lvl"));
|
||||
Assert.True(file.FileType == LbpFileType.Level);
|
||||
}
|
||||
LbpFile file = new(File.ReadAllBytes("ExampleFiles/TestLevel.lvl"));
|
||||
Assert.True(file.FileType == LbpFileType.Level);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ShouldRecognizeScript()
|
||||
{
|
||||
LbpFile file = new(File.ReadAllBytes("ExampleFiles/TestScript.ff"));
|
||||
Assert.True(file.FileType == LbpFileType.Script);
|
||||
}
|
||||
[Fact]
|
||||
public void ShouldRecognizeScript()
|
||||
{
|
||||
LbpFile file = new(File.ReadAllBytes("ExampleFiles/TestScript.ff"));
|
||||
Assert.True(file.FileType == LbpFileType.Script);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ShouldRecognizeTexture()
|
||||
{
|
||||
LbpFile file = new(File.ReadAllBytes("ExampleFiles/TestTexture.tex"));
|
||||
Assert.True(file.FileType == LbpFileType.Texture);
|
||||
}
|
||||
[Fact]
|
||||
public void ShouldRecognizeTexture()
|
||||
{
|
||||
LbpFile file = new(File.ReadAllBytes("ExampleFiles/TestTexture.tex"));
|
||||
Assert.True(file.FileType == LbpFileType.Texture);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ShouldRecognizeFileArchive()
|
||||
{
|
||||
LbpFile file = new(File.ReadAllBytes("ExampleFiles/TestFarc.farc"));
|
||||
Assert.True(file.FileType == LbpFileType.FileArchive);
|
||||
}
|
||||
[Fact]
|
||||
public void ShouldRecognizeFileArchive()
|
||||
{
|
||||
LbpFile file = new(File.ReadAllBytes("ExampleFiles/TestFarc.farc"));
|
||||
Assert.True(file.FileType == LbpFileType.FileArchive);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ShouldNotRecognizeFileArchiveAsScript()
|
||||
{
|
||||
LbpFile file = new(File.ReadAllBytes("ExampleFiles/TestFarc.farc"));
|
||||
Assert.False(file.FileType == LbpFileType.Script);
|
||||
Assert.True(file.FileType == LbpFileType.FileArchive);
|
||||
}
|
||||
[Fact]
|
||||
public void ShouldNotRecognizeFileArchiveAsScript()
|
||||
{
|
||||
LbpFile file = new(File.ReadAllBytes("ExampleFiles/TestFarc.farc"));
|
||||
Assert.False(file.FileType == LbpFileType.Script);
|
||||
Assert.True(file.FileType == LbpFileType.FileArchive);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ShouldRecognizeNothingAsUnknown()
|
||||
{
|
||||
LbpFile file = new(Array.Empty<byte>());
|
||||
Assert.True(file.FileType == LbpFileType.Unknown);
|
||||
}
|
||||
[Fact]
|
||||
public void ShouldRecognizeNothingAsUnknown()
|
||||
{
|
||||
LbpFile file = new(Array.Empty<byte>());
|
||||
Assert.True(file.FileType == LbpFileType.Unknown);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ShouldRecognizeGarbageAsUnknown()
|
||||
{
|
||||
LbpFile file = new(Encoding.ASCII.GetBytes("free pc only $900"));
|
||||
Assert.True(file.FileType == LbpFileType.Unknown);
|
||||
}
|
||||
[Fact]
|
||||
public void ShouldRecognizeGarbageAsUnknown()
|
||||
{
|
||||
LbpFile file = new(Encoding.ASCII.GetBytes("free pc only $900"));
|
||||
Assert.True(file.FileType == LbpFileType.Unknown);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue