public void RightFont() { CreateSampleWritingSystemFile(_path); _collection.LoadFromLegacyWeSayFile(_path); WritingSystem_V1 ws = _collection["PretendAnalysis"]; Assert.AreEqual("PretendAnalysis", ws.ISO); // since Linux may not have CourierNew, we // need to test against the font mapping Font expectedFont = new Font("Courier New", 10); Assert.AreEqual(expectedFont.Name, ws.Font.Name); Assert.AreEqual(expectedFont.Size, ws.Font.Size); }
public void DeserializeCollectionViaLoad() { WritingSystemCollection_V1 collection = MakeSampleCollection(); var writer = XmlWriter.Create(_path); writer.WriteStartDocument(); NetReflectorWriter(writer).Write(collection); writer.Close(); WritingSystemCollection_V1 c = new WritingSystemCollection_V1(); c.LoadFromLegacyWeSayFile(_path); Assert.IsNotNull(c); Assert.AreEqual(2, c.Values.Count); }