initial commit
Pulsar .NET 9.0 Windows Release / build (push) Waiting to run
Mirror to Codeberg and Gitea / mirror (push) Waiting to run

This commit is contained in:
i2p
2026-08-27 10:57:58 -06:00
commit 773d05f8f1
1038 changed files with 109261 additions and 0 deletions
@@ -0,0 +1,35 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Pulsar.Common.Helpers;
namespace Pulsar.Common.Tests.Helpers
{
[TestClass]
public class FileHelperTests
{
[TestMethod, TestCategory("Helpers")]
public void RandomFilenameTest()
{
int length = 100;
var name = FileHelper.GetRandomFilename(length);
Assert.IsNotNull(name);
Assert.IsTrue(name.Length == length);
}
[TestMethod, TestCategory("Helpers")]
public void ValidateExecutableTest()
{
var bytes = new byte[] { 77, 90 };
Assert.IsTrue(FileHelper.HasExecutableIdentifier(bytes));
}
[TestMethod, TestCategory("Helpers")]
public void ValidateExecutableTest2()
{
var bytes = new byte[] { 22, 93 };
Assert.IsFalse(FileHelper.HasExecutableIdentifier(bytes));
}
}
}