private void CheckMono (FontFamily ff) { Assert.IsTrue (ff.Equals (FontFamily.GenericMonospace), "GenericMonospace"); #if NET_2_0 // note: Mono has this behaviour on both 1.1 and 2.0 profiles Assert.AreEqual (ff.Name.GetHashCode (), ff.GetHashCode (), "GetHashCode"); #endif }
public void FontFamily_Invalid () { FontFamily ff = new FontFamily ((GenericFontFamilies)Int32.MinValue); // default to Monospace Assert.IsTrue (ff.Equals (FontFamily.GenericMonospace), "GenericMonospace"); CheckMono (ff); }
public void FontFamily_Serif () { FontFamily ff = new FontFamily (GenericFontFamilies.Serif); Assert.IsTrue (ff.Equals (FontFamily.GenericSerif), "GenericSerif"); // note: Mono has this behaviour on both 1.1 and 2.0 profiles Assert.AreEqual (ff.Name.GetHashCode (), ff.GetHashCode (), "GetHashCode"); }