public void ConvertLimitedDestination() { byte [] bytes = new byte [10000]; char [] chars = new char [10000]; Encoder conv = new ExposedEncoder(); int bytesUsed, charsUsed; bool done; conv.Convert(chars, 0, 10000, bytes, 0, 1000, true, out bytesUsed, out charsUsed, out done); Assert.IsFalse(done, "#1"); Assert.AreEqual(625, bytesUsed, "#2"); Assert.AreEqual(625, charsUsed, "#3"); }
public void ConvertLimitedDestination () { byte [] bytes = new byte [10000]; char [] chars = new char [10000]; Encoder conv = new ExposedEncoder (); int bytesUsed, charsUsed; bool done; conv.Convert (chars, 0, 10000, bytes, 0, 1000, true, out bytesUsed, out charsUsed, out done); Assert.IsFalse (done, "#1"); Assert.AreEqual (625, bytesUsed, "#2"); Assert.AreEqual (625, charsUsed, "#3"); }