public void WriteByteTest() { SftpSession session = null; // TODO: Initialize to an appropriate value string path = string.Empty; // TODO: Initialize to an appropriate value FileMode mode = new FileMode(); // TODO: Initialize to an appropriate value SftpFileStream target = new SftpFileStream(session, path, mode); // TODO: Initialize to an appropriate value byte value = 0; // TODO: Initialize to an appropriate value target.WriteByte(value); Assert.Inconclusive("A method that does not return a value cannot be verified."); }
public void WriteByteShouldThrowNotSupportedException() { SftpSessionMock.InSequence(MockSequence).Setup(p => p.IsOpen).Returns(true); try { _target.WriteByte(0x0a); } catch (NotSupportedException ex) { Assert.IsNull(ex.InnerException); Assert.AreEqual("Write not supported.", ex.Message); } SftpSessionMock.Verify(p => p.IsOpen, Times.Exactly(1)); }