private byte[] getFileContent()
{
byte[] content = null;
if( _currentFileType == "test")
{
FileStream fstream = File.OpenRead("C:\\Temp\\test.docx");
content = new byte[fstream.Length];
fstream.Read(content, 0, (int)fstream.Length);
fstream.Close();
}
else if (_currentFileType == "docx")
{
content = SampleData.CreateDocx();
}
else if (_currentFileType == "xlsx")
{
content = SampleData.CreateExcel();
}
else if (_currentFileType == "pdf")
{
content = SampleData.CreatePDF(WorkingDefinition.MinDocumentSizeKB, WorkingDefinition.MaxDocumentSizeMB * 1024);
}
else if (_currentFileType == "png")
{
content = SampleData.AddRandomPngFile();
}
return content;
}