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

            Assert.AreEqual(Encoding.ASCII, writer.Encoding);
        }
Esempio n. 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());
        }
Esempio n. 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);
 }
Esempio n. 8
0
        public void TextFileWriterWithNullBuffersize()
        {
            TextFileWriter writer = new TextFileWriter(path);

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

            writer.Write(null, 2);
        }