public void TestMaxByteCount() { UTF7Encoding UTF7enc = new UTF7Encoding(); #if NET_2_0 Assert.AreEqual(152, UTF7enc.GetMaxByteCount(50), "UTF #1"); #else Assert.AreEqual(136, UTF7enc.GetMaxByteCount(50), "UTF #1"); #endif }
public void NegTest1() { UTF7Encoding utf7 = new UTF7Encoding(); int charCount = -1; Assert.Throws<ArgumentOutOfRangeException>(() => { int maxByteCount = utf7.GetMaxByteCount(charCount); }); }
public void NegTest1() { UTF7Encoding utf7 = new UTF7Encoding(); int charCount = -1; Assert.Throws <ArgumentOutOfRangeException>(() => { int maxByteCount = utf7.GetMaxByteCount(charCount); }); }
public static void Main() { UTF7Encoding utf7 = new UTF7Encoding(); int charCount = 2; int maxByteCount = utf7.GetMaxByteCount(charCount); Console.WriteLine( "Maximum of {0} bytes needed to encode {1} characters.", maxByteCount, charCount ); }
public void TestMaxByteCount() { UTF7Encoding UTF7enc = new UTF7Encoding(); Assert.AreEqual(152, UTF7enc.GetMaxByteCount(50), "UTF #1"); }
public void PosTest2() { int charCount = 8; UTF7Encoding utf7 = new UTF7Encoding(); int maxByteCount = utf7.GetMaxByteCount(charCount); }