public void WriteByteTest() { ReportStart(); MemoryStream s = new MemoryStream(); int valueToWrite = 0x3b2a13; ExampleComponent.CallWriteByte(valueToWrite, s); s.Seek(0, SeekOrigin.Begin); Assert.AreEqual(1, s.Length); // first 2 bytes will have been discarded int byte1 = s.ReadByte(); Assert.AreEqual(0x13, byte1); ReportEnd(); }
public void WriteByteNullStreamTest() { ReportStart(); Stream s = null; try { ExampleComponent.CallWriteByte(12, s); } catch (ArgumentNullException ex) { Assert.AreEqual("outputStream", ex.ParamName); ReportEnd(); throw; } }