public void GetSetEncoding()
        {
            TextFileWriter writer = new TextFileWriter(path);
            writer.Encoding = Encoding.ASCII;

            Assert.AreEqual(Encoding.ASCII, writer.Encoding);
        }
예제 #2
0
        public void GetSetEncoding()
        {
            TextFileWriter writer = new TextFileWriter(path);

            writer.Encoding = Encoding.ASCII;

            Assert.AreEqual(Encoding.ASCII, writer.Encoding);
        }
        public void WriteReadFile()
        {
            TextFileWriter writer = new TextFileWriter(path);
            writer.Write(content);

            TextFileReader reader = new TextFileReader(path);
            
            Assert.AreEqual(content, reader.GetString());
        }
예제 #4
0
        public void WriteReadFile()
        {
            TextFileWriter writer = new TextFileWriter(path);

            writer.Write(content);

            TextFileReader reader = new TextFileReader(path);

            Assert.AreEqual(content, reader.GetString());
        }
        public void WriteHashFile()
        {
            new TextFileWriter(this.path).Write(Text);

            TextFileReader reader = new TextFileReader(this.path);
            TextFileWriter writer = new TextFileWriter(this.md5Path);

            this.testee.WriteHash(reader, writer);

            Assert.AreEqual(new MD5Algorithm().ComputeHash(Text), new TextFileReader(this.md5Path).GetString());
        }
 public void TextFileWriterWithNullBuffersize()
 {
     TextFileWriter writer = new TextFileWriter(path);
     writer.Write( new MemoryStream( Encoding.Default.GetBytes("text") ) , 0 );
 }
 public void TextFileWriterWithNullStream()
 {
     TextFileWriter writer = new TextFileWriter(path);
     writer.Write(null, 2);
 }
예제 #8
0
        public void TextFileWriterWithNullBuffersize()
        {
            TextFileWriter writer = new TextFileWriter(path);

            writer.Write(new MemoryStream(Encoding.Default.GetBytes("text")), 0);
        }
예제 #9
0
        public void TextFileWriterWithNullStream()
        {
            TextFileWriter writer = new TextFileWriter(path);

            writer.Write(null, 2);
        }