using Amphora; using UnitTestSharp; namespace Foundations.UnitTests { public class HostFlagsTests : TestFixture { public static FlagRegistry Host() { return FlagRegistry.ScanTypes(new[] { typeof(HostFlags) }); } public class DevTests : TestFixture { public void IsOffUnlessGiven() { CheckFalse(Host().Parse(new string[0]).Value.Get(HostFlags.Dev)); CheckTrue(Host().Parse(new[] { "--dev" }).Value.Get(HostFlags.Dev)); } public void IsReadFromAPagesAddress() { CheckTrue(Host().Parse(QueryArguments.From("?dev")).Value.Get(HostFlags.Dev)); } } } }