//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldTransformFromInputStreamToByteArray() public virtual void shouldTransformFromInputStreamToByteArray() { string testString = "Test String"; Stream inputStream = IoUtil.stringAsInputStream(testString); assertThat(IoUtil.inputStreamAsByteArray(inputStream)).isEqualTo(testString.GetBytes(IoUtil.ENCODING_CHARSET)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldTransformFromStringToInputStreamToByteArray() public virtual void shouldTransformFromStringToInputStreamToByteArray() { string testString = "Test String"; Stream inputStream = IoUtil.stringAsInputStream(testString); string newString = IoUtil.inputStreamAsString(inputStream); assertThat(testString).isEqualTo(newString); inputStream = IoUtil.stringAsInputStream(testString); sbyte[] newBytes = newString.GetBytes(IoUtil.ENCODING_CHARSET); assertThat(IoUtil.inputStreamAsByteArray(inputStream)).isEqualTo(newBytes); }