You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.0 KiB

using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MsgReader;
namespace MsgReaderTests
{
[TestClass]
public class LoadTest
{
private DirectoryInfo _tempDirectory;
[TestInitialize]
public void Initialize()
{
var tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
_tempDirectory = Directory.CreateDirectory(tempDirectory);
}
[TestCleanup]
public void Cleanup()
{
_tempDirectory.Delete(true);
}
[TestMethod]
public void Extract_10000_Times()
{
for (var i = 0; i < 10000; i++)
{
var msgReader = new Reader();
var tempDirectory =
Directory.CreateDirectory(Path.Combine(_tempDirectory.FullName, Path.GetRandomFileName()));
msgReader.ExtractToFolder(Path.Combine("SampleFiles", "EmailWithAttachments.msg"), tempDirectory.FullName);
}
}
}
}