ToString() public method

Returns the string form of this Realm.
public ToString ( ) : string
return string
Example #1
0
        public void EqualsTest()
        {
            Realm testRealm1a = new Realm("http://www.yahoo.com");
            Realm testRealm1b = new Realm("http://www.yahoo.com");
            Realm testRealm2 = new Realm("http://www.yahoo.com/b");
            Realm testRealm3 = new Realm("http://*.www.yahoo.com");

            Assert.AreEqual(testRealm1a, testRealm1b);
            Assert.AreNotEqual(testRealm1a, testRealm2);
            Assert.AreNotEqual(testRealm1a, null);
            Assert.AreNotEqual(testRealm1a, testRealm1a.ToString(), "Although the URLs are equal, different object types shouldn't be equal.");
            Assert.AreNotEqual(testRealm3, testRealm1a, "Wildcard difference ignored by Equals");
        }