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
32 lines
1.0 KiB
C#
32 lines
1.0 KiB
C#
using NUnit.Framework;
|
|
using Robust.Client.Interfaces.UserInterface;
|
|
using Robust.Client.UserInterface;
|
|
using Robust.Client.UserInterface.Controls;
|
|
using Robust.Client.Utility;
|
|
using Robust.Shared.Interfaces.Resources;
|
|
using Robust.Shared.IoC;
|
|
using Robust.Shared.Utility;
|
|
using Robust.Shared.Maths;
|
|
|
|
namespace Robust.UnitTesting.Client.UserInterface.Controls
|
|
{
|
|
[TestFixture]
|
|
[TestOf(typeof(CenterContainer))]
|
|
public class CenterContainerTest : RobustUnitTest
|
|
{
|
|
public override UnitTestProject Project => UnitTestProject.Client;
|
|
|
|
[Test]
|
|
public void Test()
|
|
{
|
|
var container = new CenterContainer {Size = (100, 100)};
|
|
var child = new Control {CustomMinimumSize = (50, 50)};
|
|
|
|
container.AddChild(child);
|
|
Assert.That(container.CombinedMinimumSize, Is.EqualTo(new Vector2(50, 50)));
|
|
Assert.That(child.Position, Is.EqualTo(new Vector2(25, 25)));
|
|
Assert.That(child.Size, Is.EqualTo(new Vector2(50, 50)));
|
|
}
|
|
}
|
|
}
|