public void TestConvertFrom()
 {
     FontConverter.FontNameConverter f = new FontConverter.FontNameConverter();
     // returns "Times" under Linux and "Times New Roman" under Windows
     Assert.IsTrue((f.ConvertFrom("Times") as string).StartsWith("Times"), "string test");
     Assert.IsTrue(f.GetStandardValuesSupported(), "standard values supported");
     Assert.IsFalse(f.GetStandardValuesExclusive(), "standard values exclusive");
 }
Exemple #2
0
 public void TestConvertFrom()
 {
     FontConverter.FontNameConverter converter = new FontConverter.FontNameConverter();
     // returns "Times" under Linux and "Times New Roman" under Windows
     if (PlatformDetection.IsWindows)
     {
         Assert.Equal("Times New Roman", converter.ConvertFrom("Times") as string);
     }
     else
     {
         Assert.Equal("Times", converter.ConvertFrom("Times") as string);
     }
     Assert.True(converter.GetStandardValuesSupported(), "standard values supported");
     Assert.False(converter.GetStandardValuesExclusive(), "standard values exclusive");
 }