private TestHostContext Initialize([CallerMemberName] string name = "", bool createWorkDirectory = true) { var hostContext = new TestHostContext(this, name); this.stubWorkFolder = hostContext.GetDirectory(WellKnownDirectory.Work); if (createWorkDirectory) { Directory.CreateDirectory(this.stubWorkFolder); } this.releaseDirectoryManager = new ReleaseDirectoryManager(); this.releaseDirectoryManager.Initialize(hostContext); return(hostContext); }
private TestHostContext Initialize([CallerMemberName] string name = "", bool createWorkDirectory = true) { this.stubWorkFolder = Path.Combine( Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), $"_work_{Path.GetRandomFileName()}"); if (createWorkDirectory) { Directory.CreateDirectory(this.stubWorkFolder); } var hostContext = new TestHostContext(this, name); this.releaseDirectoryManager = new ReleaseDirectoryManager(); this.releaseDirectoryManager.Initialize(hostContext); return(hostContext); }