public void TruncateWorksWithPositiveNumbers() { Assert.AreEqual(string.Empty, MHString.Truncate("", 5), string.Empty, "t1"); Assert.AreEqual("1", MHString.Truncate("123456789", 1), "t2"); Assert.AreEqual("123456789", MHString.Truncate("123456789", 9), "t3"); Assert.AreEqual("123456789", MHString.Truncate("123456789", 99), "t4"); Assert.AreEqual(string.Empty, MHString.Truncate("123456789", 0), "t5"); }
public void TruncateWithNegRaisesException() { string test = MHString.Truncate("123456789", -1); }