mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-03 02:27:08 +02:00
RobustToolbox projects should be named Robust.* This PR changes the RobustToolbox projects from SS14.* to Robust.* Updates SS14.* prefixes/namespaces to Robust.* Updates SpaceStation14.sln to RobustToolbox.sln Updates MSBUILD/SS14.* to MSBUILD/Robust.* Updates CSProject and MSBuild references for the above Updates git_helper.py Removes Runserver and Runclient as they are unusable
37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
using NUnit.Framework;
|
|
using Robust.Shared.Maths;
|
|
using Robust.Client.Graphics.Drawing;
|
|
|
|
|
|
namespace Robust.UnitTesting.Client.Graphics
|
|
{
|
|
[TestFixture]
|
|
[Parallelizable(ParallelScope.All)]
|
|
[TestOf(typeof(StyleBox))]
|
|
public class StyleBoxTest
|
|
{
|
|
[Test]
|
|
public void TestGetEnvelopBox()
|
|
{
|
|
var styleBox = new StyleBoxFlat();
|
|
|
|
Assert.That(
|
|
styleBox.GetEnvelopBox(Vector2.Zero, new Vector2(50, 50)),
|
|
Is.EqualTo(new UIBox2(0, 0, 50, 50)));
|
|
|
|
styleBox.ContentMarginLeftOverride = 3;
|
|
styleBox.ContentMarginTopOverride = 5;
|
|
styleBox.ContentMarginRightOverride = 7;
|
|
styleBox.ContentMarginBottomOverride = 11;
|
|
|
|
Assert.That(
|
|
styleBox.GetEnvelopBox(Vector2.Zero, new Vector2(50, 50)),
|
|
Is.EqualTo(new UIBox2(0, 0, 60, 66)));
|
|
|
|
Assert.That(
|
|
styleBox.GetEnvelopBox(new Vector2(10, 10), new Vector2(50, 50)),
|
|
Is.EqualTo(new UIBox2(10, 10, 70, 76)));
|
|
}
|
|
}
|
|
}
|