using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
namespace AltSerializer.Tests
{
public static class Common
{
const int bigDummyFileKilobyte = 1024; //Create a 1MB File
///
/// Create a large file of 100 lines to upload
///
///
///
public static string CreateBigDummyFile(string path, string fileName, int lines)
{
StringBuilder sb = new StringBuilder(lines * bigDummyFileKilobyte);
path = System.IO.Path.Combine(path, fileName);
for (long i = 0; i < bigDummyFileKilobyte * 10; i++)
{
sb.AppendFormat("This is text line {0} \r\n", i);
}
System.IO.File.WriteAllText(path, sb.ToString());
return path;
}
}
}