public void AddAzurePHPWebRoleProcess() { using (FileSystemHelper files = new FileSystemHelper(this)) { string roleName = "WebRole1"; string serviceName = "AzureService"; string rootPath = files.CreateNewService(serviceName); addPHPWebCmdlet = new AddAzurePHPWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime }; string expectedVerboseMessage = string.Format(Resources.AddRoleMessageCreatePHP, rootPath, roleName); addPHPWebCmdlet.ExecuteCmdlet(); AzureAssert.ScaffoldingExists(Path.Combine(rootPath, roleName), Path.Combine(Resources.PHPScaffolding, Resources.WebRole)); Assert.AreEqual<string>(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue<string>(Parameters.RoleName)); Assert.AreEqual<string>(expectedVerboseMessage, mockCommandRuntime.VerboseStream[0]); } }
public void AddAzurePHPWebRoleProcess() { using (FileSystemHelper files = new FileSystemHelper(this)) { string roleName = "WebRole1"; string serviceName = "AzureService"; string rootPath = files.CreateNewService(serviceName); addPHPWebCmdlet = new AddAzurePHPWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime }; string expectedVerboseMessage = string.Format(Resources.AddRoleMessageCreatePHP, rootPath, roleName); addPHPWebCmdlet.ExecuteCmdlet(); AzureAssert.ScaffoldingExists(Path.Combine(rootPath, roleName), Path.Combine(Resources.PHPScaffolding, Resources.WebRole)); Assert.Equal <string>(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue <string>(Parameters.RoleName)); Assert.Equal <string>(expectedVerboseMessage, mockCommandRuntime.VerboseStream[0]); } }