diff --git a/tests/Tgstation.Server.Host.Tests/TestServerFactory.cs b/tests/Tgstation.Server.Host.Tests/TestServerFactory.cs new file mode 100644 index 0000000000..1334ae87c9 --- /dev/null +++ b/tests/Tgstation.Server.Host.Tests/TestServerFactory.cs @@ -0,0 +1,32 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; + +namespace Tgstation.Server.Host.Tests +{ + /// + /// Tests for + /// + [TestClass] + public sealed class TestServerFactory + { + [TestMethod] + public void TestWorksWithoutUpdatePath() + { + var factory = new ServerFactory(); + + Assert.ThrowsException(() => factory.CreateServer(null, null)); + factory.CreateServer(Array.Empty(), null); + } + + [TestMethod] + public void TestWorksWithUpdatePath() + { + var factory = new ServerFactory(); + const string Path = "/test"; + + Assert.ThrowsException(() => factory.CreateServer(null, null)); + Assert.ThrowsException(() => factory.CreateServer(null, Path)); + factory.CreateServer(Array.Empty(), Path); + } + } +}