using System; using System.Threading; using Glass.Startup; using UnitTestSharp; namespace Glass.UnitTests.Startup { public class WarmupTests : TestFixture { public class RunTests : TestFixture { public void Completes() { Warmup.Run(); } public void CanRunTwice() { Warmup.Run(); Warmup.Run(); } public void RunsOnABackgroundThread() { Exception thrown = null; var thread = new Thread(() => { try { Warmup.Run(); } catch (Exception exception) { thrown = exception; } }); thread.Start(); thread.Join(); CheckNull(thrown); } } } }