From 9290ab445a537991940dee1fe51acaf8a4b7384a Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Tue, 30 Jul 2019 13:02:40 +0200 Subject: [PATCH] Fix Stylesheet tests. --- Robust.UnitTesting/Client/UserInterface/StylesheetTest.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Robust.UnitTesting/Client/UserInterface/StylesheetTest.cs b/Robust.UnitTesting/Client/UserInterface/StylesheetTest.cs index 4ecd4c9ee1..af2f27396f 100644 --- a/Robust.UnitTesting/Client/UserInterface/StylesheetTest.cs +++ b/Robust.UnitTesting/Client/UserInterface/StylesheetTest.cs @@ -11,6 +11,12 @@ namespace Robust.UnitTesting.Client.UserInterface { public override UnitTestProject Project => UnitTestProject.Client; + [OneTimeSetUp] + public void Setup() + { + IoCManager.Resolve().InitializeTesting(); + } + [Test] public void TestSelectors() { @@ -65,6 +71,7 @@ namespace Robust.UnitTesting.Client.UserInterface uiMgr.Stylesheet = sheet; var control = new Label(); + uiMgr.StateRoot.AddChild(control); control.TryGetStyleProperty("foo", out string value); Assert.That(value, Is.EqualTo("bar"));