public void BootstrapsBasicApplicationFileChange()
{
string path = ApplicationUtils.CreateValidExampleApplication();
string filePath = Path.Combine(path, Path.GetFileNameWithoutExtension(Path.GetRandomFileName()) + ".dll");
ManualResetEvent handle = new ManualResetEvent(false);
try
{
using (Bootstraps bootstraps = new Bootstraps(path, null, 500))
{
bootstraps.ApplicationFilesChanged += (sender, e) =>
{
Assert.AreEqual(filePath, e.FullPath);
handle.Set();
};
Assert.AreEqual(BootstrapsPullupResultType.Success, bootstraps.PullUp().ResultType);
using (File.Create(filePath))
{
}
WaitHandle.WaitAll(new WaitHandle[] { handle });
}
}
finally
{
handle.Close();
}
}