public static void Register_TooBigPort() { prefix = "unit.test."; TestUriParser parser = new TestUriParser(); Assert.Throws<System.ArgumentOutOfRangeException>(() => { UriParser.Register(parser, prefix + "too.big.port", UInt16.MaxValue); }); }