public void SetupTest() { GlobalPathInfo.GlobalSettingsDirectory = Data.AzureSdkAppDir; mockCommandRuntime = new MockCommandRuntime(); newServiceCmdlet = new NewAzureServiceProjectCommand(); addCacheRoleCmdlet = new AddAzureCacheWorkerRoleCommand(); newServiceCmdlet.CommandRuntime = mockCommandRuntime; addCacheRoleCmdlet.CommandRuntime = mockCommandRuntime; }
public void SetupTest() { cmdlet = new NewAzureServiceProjectCommand(); mockCommandRuntime = new MockCommandRuntime(); cmdlet.CommandRuntime = mockCommandRuntime; }
public void TestSetup() { mockCommandRuntime = new MockCommandRuntime(); newServiceCmdlet = new NewAzureServiceProjectCommand(); newServiceCmdlet.CommandRuntime = mockCommandRuntime; }
public void SetupTest() { writer = new FakeWriter(); cmdlet = new NewAzureServiceProjectCommand(); cmdlet.Writer = writer; }
public void GetServiceNameTest() { using (FileSystemHelper files = new FileSystemHelper(this)) { NewAzureServiceProjectCommand newServiceCmdlet = new NewAzureServiceProjectCommand(); newServiceCmdlet.CommandRuntime = new MockCommandRuntime(); newServiceCmdlet.NewAzureServiceProcess(files.RootPath, serviceName); Assert.AreEqual<string>(serviceName, new AzureService(Path.Combine(files.RootPath, serviceName), null).ServiceName); } }
/// <summary> /// Create a new service with a given name and make that the current /// directory used by cmdlets. /// </summary> /// <param name="serviceName">Name of the service.</param> /// <returns>Directory created for the service.</returns> public string CreateNewService(string serviceName) { NewAzureServiceProjectCommand cmdlet = new NewAzureServiceProjectCommand(); cmdlet.CommandRuntime = new MockCommandRuntime(); cmdlet.NewAzureServiceProcess(RootPath, serviceName); string path = Path.Combine(RootPath, serviceName); _previousDirectory = Environment.CurrentDirectory; Environment.CurrentDirectory = path; return path; }
public void SetupTest() { GlobalPathInfo.GlobalSettingsDirectory = Data.AzureSdkAppDir; CmdletSubscriptionExtensions.SessionManager = new InMemorySessionManager(); mockCommandRuntime = new MockCommandRuntime(); newServiceCmdlet = new NewAzureServiceProjectCommand(); addCacheRoleCmdlet = new AddAzureCacheWorkerRoleCommand(); newServiceCmdlet.CommandRuntime = mockCommandRuntime; addCacheRoleCmdlet.CommandRuntime = mockCommandRuntime; }