public void TestThatValidationsSucceedsWhenDirectoriesExists() { var operation = new PreCompileOperation("MyWebApp", _validWebAppPath, _validOutputPath, _buildManager.Object); var notification = new Notification(); Assert.That(operation.IsValid(notification)); }
public void TestThatValidationsFailsWhenAppNameIsEmpty() { var operation = new PreCompileOperation("", _validWebAppPath, _validOutputPath, _buildManager.Object); var notification = new Notification(); Assert.That(operation.IsValid(notification), Is.False); }
public IOfferLocalOperations PreCompile(string webApplicationName, string webApplicationPhysicalPath, string preCompileOutputpath) { var operation = new PreCompileOperation(webApplicationName, webApplicationPhysicalPath, preCompileOutputpath); AddOperation(operation); return(this); }
/// <summary> /// Pre-compile Web Applications to optimize startup time for the application. Even though this operation exist in ConDep, we recommend you to pre-compile web applications as part of your build process, and not the deployment process, using aspnet_compiler.exe. /// </summary> /// <param name="local"></param> /// <param name="webApplicationName">Name of the web application you want to pre-compile</param> /// <param name="webApplicationPhysicalPath">Location path to web application</param> /// <param name="preCompileOutputpath">Path to where you want the pre-compiled application to be copied</param> /// <returns></returns> public static IOfferLocalOperations PreCompile(this IOfferLocalOperations local, string webApplicationName, string webApplicationPhysicalPath, string preCompileOutputpath) { var operation = new PreCompileOperation(webApplicationName, webApplicationPhysicalPath, preCompileOutputpath); OperationExecutor.Execute((LocalBuilder)local, operation); return(local); }
/// <summary> /// Pre-compile Web Applications to optimize startup time for the application. Even though this operation exist in ConDep, we recommend you to pre-compile web applications as part of your build process, and not the deployment process, using aspnet_compiler.exe. /// </summary> /// <param name="webApplicationName"></param> /// <param name="webApplicationPhysicalPath"></param> /// <param name="preCompileOutputpath"></param> /// <returns></returns> public static IOfferLocalOperations PreCompile(this IOfferLocalOperations local, string webApplicationName, string webApplicationPhysicalPath, string preCompileOutputpath) { var operation = new PreCompileOperation(webApplicationName, webApplicationPhysicalPath, preCompileOutputpath); Configure.Operation(local, operation); return(local); }
public void TestThatPreCompileExecutesSuccessfully() { var operation = new PreCompileOperation("MyWebApp", @"C:\temp\MyWebApp", @"C:\temp\MyWebAppCompiled", _buildManager.Object); var status = new StatusReporter(); operation.Execute(_settingsDefault, _token); Assert.That(status.HasErrors, Is.False); _buildManager.Verify(manager => manager.PrecompileApplication(It.IsAny <PreCompileCallback>())); }
public void TestThatPreCompileExecutesSuccessfully() { var operation = new PreCompileOperation("MyWebApp", @"C:\temp\MyWebApp", @"C:\temp\MyWebAppCompiled", _buildManager.Object); var status = new StatusReporter(); operation.Execute(status, new ConDepConfig(), new ConDepOptions(false, "", false, false, false, false, null)); Assert.That(status.HasErrors, Is.False); _buildManager.Verify(manager => manager.PrecompileApplication(It.IsAny <PreCompileCallback>())); }