public void GetsPublishSettingsFileUrl() { // Setup Mock <ICommandRuntime> commandRuntimeMock = new Mock <ICommandRuntime>(); GetAzurePublishSettingsFileCommand cmdlet = new GetAzurePublishSettingsFileCommand() { CommandRuntime = commandRuntimeMock.Object, PassThru = true, Environment = EnvironmentName.AzureCloud, Realm = "microsoft.com" }; // Test cmdlet.ExecuteCmdlet(); // Assert commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Once()); }
public void GetsPublishSettingsFileUrl() { // Setup Mock<ICommandRuntime> commandRuntimeMock = new Mock<ICommandRuntime>(); GetAzurePublishSettingsFileCommand cmdlet = new GetAzurePublishSettingsFileCommand() { CommandRuntime = commandRuntimeMock.Object, PassThru = true, Environment = EnvironmentName.AzureCloud, Realm = "microsoft.com" }; // Test cmdlet.ExecuteCmdlet(); // Assert commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Once()); }
public void GetsPublishSettingsFileUrl() { // Setup AzureSession.DataStore = new MemoryDataStore(); Mock <ICommandRuntime> commandRuntimeMock = new Mock <ICommandRuntime>(); GetAzurePublishSettingsFileCommand cmdlet = new GetAzurePublishSettingsFileCommand() { CommandRuntime = commandRuntimeMock.Object, PassThru = true, Environment = EnvironmentName.AzureCloud, Realm = "microsoft.com" }; cmdlet.ProfileClient = new ProfileClient(new AzureSMProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile))); // Test cmdlet.ExecuteCmdlet(); // Assert commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Once()); }