public void AppendString() { using (var s = new CFMutableString()) { Assert.Throws <ArgumentNullException> (() => s.Append((string)null), "null"); // from NSHipster s.Append("Énġlišh långuãge lẳcks iñterêßţing diaçrïtičş!"); Assert.That(s.Handle, Is.Not.EqualTo(IntPtr.Zero), "Handle"); Assert.That(s.ToString(), Is.EqualTo("Énġlišh långuãge lẳcks iñterêßţing diaçrïtičş!"), "ToString"); } }
public void AppendString_RtL() { using (var s = new CFMutableString()) { s.Append("שלום"); Assert.That(s.Handle, Is.Not.EqualTo(IntPtr.Zero), "Handle"); Assert.That(s.ToString(), Is.EqualTo("שלום"), "ToString"); } }
public void AppendString_Unicode() { using (var s = new CFMutableString("Bonjour")) { s.Append(" à tous les \ud83d\udc11!"); Assert.That(s.Handle, Is.Not.EqualTo(IntPtr.Zero), "Handle"); // make it fail and you see the sheep printed in the touchunit runner UI :) Assert.That(s.ToString(), Is.EqualTo("Bonjour à tous les \ud83d\udc11!"), "ToString"); } }