AzureWebFarm.Tests.Services.BackgroundWorkerServiceShould.ArrangeTestApp C# (CSharp) Method

ArrangeTestApp() private static method

private static ArrangeTestApp ( int app, string siteName, int destApp, bool alreadyHasWebConfig = false ) : void
app int
siteName string
destApp int
alreadyHasWebConfig bool
return void
        private static void ArrangeTestApp(int app, string siteName, int destApp = 0, bool alreadyHasWebConfig = false)
        {
            if (destApp == 0)
                destApp = app;
            var dirPath = GetOriginalDropPath(siteName, destApp);
            if (!Directory.Exists(dirPath))
                Directory.CreateDirectory(dirPath);
            File.Copy(Path.Combine(TestPath, string.Format(TestAppExe, app)), Path.Combine(GetOriginalDropPath(siteName, destApp), string.Format(TestAppExe, destApp)), true);
            if (alreadyHasWebConfig)
                File.WriteAllText(Path.Combine(GetOriginalDropPath(siteName, destApp), "web.config"), OriginalWebConfigContents);
        }