using System;
using System.IO;

namespace Sasa.QualityTools.DrFx.Core.Tests.Unit.TestingUtilities
{
    internal static class StreamGenerator
    {
        internal static Stream GenerateWith(string content)
        {
            MemoryStream stream = new MemoryStream();
            
            StreamWriter writer = new StreamWriter(stream);
            writer.Write(content);
            writer.Flush();

            stream.Seek(0, SeekOrigin.Begin);

            return stream;
        }
    }
}
