public void CopyToAsync_Invalid() { var sc = new StringContent (""); try { sc.CopyToAsync (null); Assert.Fail ("#1"); } catch (ArgumentNullException) { } }
public void CopyToAsync() { var sc = new StringContent ("gt"); var dest = new MemoryStream (); var task = sc.CopyToAsync (dest); task.Wait (); Assert.AreEqual (2, dest.Length, "#1"); }