}
[Test]
- [Category ("NotWorking")]
public void InitializeAndValidate ()
{
UriFormatException error = null;
[Test]
[ExpectedException (typeof (NullReferenceException))]
- [Category ("NotWorking")]
+ // oh man, this is a bad boy.It should be ArgumentNullException.
public void InitializeAndValidate_Null ()
{
UriFormatException error = null;
Assert.IsTrue (UriParser.IsKnownScheme (scheme), "IsKnownScheme-true");
}
+ [Test]
+ [Category ("NotWorking")]
+ public void OnRegister2 ()
+ {
+ string scheme = prefix + "onregister2";
+ Assert.IsFalse (UriParser.IsKnownScheme (scheme), "IsKnownScheme-false");
+ UnitTestUriParser p = new UnitTestUriParser ();
+ try {
+ UriParser.Register (p, scheme, 2005);
+ Uri uri = new Uri (scheme + "://foobar:2005");
+ Assert.AreEqual (scheme, uri.Scheme, "uri-prefix");
+ Assert.AreEqual (2005, uri.Port, "uri-port");
+
+ Assert.AreEqual ("//foobar:2005", uri.LocalPath, "uri-localpath");
+ }
+ catch (NotSupportedException) {
+ // special case / ordering
+ }
+ // if true then the registration is done before calling OnRegister
+ Assert.IsTrue (UriParser.IsKnownScheme (scheme), "IsKnownScheme-true");
+ }
+
[Test]
[Category ("NotWorking")]
public void Resolve ()
Assert.IsTrue (UriParser.IsKnownScheme ("net.tcp"), "net.tcp");
Assert.IsTrue (UriParser.IsKnownScheme ("news"), "news");
Assert.IsTrue (UriParser.IsKnownScheme ("nntp"), "nntp");
- // infered from class library
+ // inferred from class library
Assert.IsTrue (UriParser.IsKnownScheme ("ldap"), "ldap");
Assert.IsFalse (UriParser.IsKnownScheme ("ldaps"), "ldaps");
// well known for not existing
// variations - mixed and upper case
Assert.IsTrue (UriParser.IsKnownScheme ("FiLe"), "FiLe");
Assert.IsTrue (UriParser.IsKnownScheme ("FTP"), "ftp");
+
+ // see 496783
+ Assert.IsFalse (UriParser.IsKnownScheme ("tcp"), "tcp");
}
[Test]