public void ShouldSafeToStringTest() { DataTypeFascade dataTypeFascade; dataTypeFascade = new DataTypeFascade(); Assert.AreEqual("123.456", dataTypeFascade.SafeToString(123.456)); Assert.AreEqual("123.46", dataTypeFascade.SafeToString(123.456, "n")); Assert.AreEqual("urn:foo", dataTypeFascade.SafeToString(new Uri("urn:foo"), "n")); Assert.AreEqual(string.Empty, dataTypeFascade.SafeToString((object)null, null)); Assert.AreEqual(null, dataTypeFascade.SafeToString((object)null, null, null)); Assert.AreEqual("1", dataTypeFascade.SafeToString((object)string.Empty, null, "1", true)); }