void AllocateAndDump(string exe, int n, string dumpFile) { DumpCreator creator = new DumpCreator(true, false); var process = DumpCreatorTests.AllocStrings(exe, n); string dumpfile = creator.Dump(new string[] { "-ma", $"{process.Id}", $"{dumpFile}" }); Assert.IsNotNull(dumpfile, $"Dump {dumpFile} could not be created"); process.Kill(); }
public void Can_Dump_Process() { DumpCreator creator = new DumpCreator(true, false); var process = AllocStrings(); string file = creator.Dump(new string[] { process.Id.ToString(), "test.dmp" }); Assert.IsNotNull(file, "Output dump file was null!"); Assert.IsTrue(File.Exists(file), "Dump file does not exist!"); Assert.IsNotNull(TargetInformation.GetExistingVMMapFile(file), "Associated VMMap dump file was not found. Is VMMap.exe in path?"); }