mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-07-31 15:58:27 -04:00
* Move all unit tests to Engine/Tests * Fix Margin.EdgeSubtract * Fix Capsule.Contains * EnvironmentVariables.Remove if it's null * Fixed ray trace never returning startedsolid * Fix HistoryList.Navigate on empty list * Fix GameObject.WorldPosition accepting NaNs * Fix flex: initial expanding to the wrong grow/shrink * Translation.TryConvert shouldn't throw on invalid enum strings * Skip sound file tests on machines with no audio device
33 lines
754 B
C#
33 lines
754 B
C#
using System;
|
|
|
|
namespace AccessTests;
|
|
|
|
[TestClass]
|
|
public partial class VerifyAssemblyTest
|
|
{
|
|
/// <summary>
|
|
/// Assembly shouldn't be using a different name to its package name
|
|
/// </summary>
|
|
[TestMethod]
|
|
[DataRow( "package.gio.box.dll" )]
|
|
public void Assembly_Should_Not_Be_Renamed( string dllName )
|
|
{
|
|
using var ac = new AccessControl();
|
|
|
|
using var input = System.IO.File.OpenRead( $"{System.Environment.CurrentDirectory}/unittest/{dllName}" );
|
|
|
|
var result = ac.VerifyAssembly( input, out var trusted );
|
|
|
|
Assert.AreNotEqual( 0, result.Errors.Count, "Should produce an error on renamed dll" );
|
|
|
|
foreach ( var error in result.Errors )
|
|
{
|
|
Console.WriteLine( error );
|
|
}
|
|
|
|
Assert.IsFalse( result.Success );
|
|
|
|
trusted?.Dispose();
|
|
}
|
|
}
|