public void TestWaitGceManagedInstanceGroupPipelineRegional()
        {
            var listResponse = new RegionInstanceGroupManagersListInstancesResponse()
            {
                ManagedInstances = new[]
                {
                    FirstTestInstance,
                    SecondTestInstance
                }
            };

            string instanceGroupName = "RegionalInstanceGroup";
            InstanceGroupManager regionalInstanceGroup =
                CreateRegionalInstanceGroup(instanceGroupName, FakeProjectId, FakeRegionName);

            string managedRegionVar = "managedRegion";

            Pipeline.Runspace.SessionStateProxy.SetVariable(managedRegionVar, regionalInstanceGroup);

            Mock <RegionInstanceGroupManagersResource> instances =
                ServiceMock.Resource(s => s.RegionInstanceGroupManagers);

            instances.SetupRequest(
                item => item.ListManagedInstances(FakeProjectId, FakeRegionName, instanceGroupName),
                listResponse);

            Pipeline.Commands.AddScript(
                $"${managedRegionVar} | Wait-GceManagedInstanceGroup");
            Pipeline.Invoke();

            instances.VerifyAll();
        }
        public void TestWaitGceManagedInstanceGroupByRegion()
        {
            var listResponse = new RegionInstanceGroupManagersListInstancesResponse()
            {
                ManagedInstances = new[]
                {
                    FirstTestInstance,
                    SecondTestInstance
                }
            };

            string instanceGroupName = "instance-group";
            Mock <RegionInstanceGroupManagersResource> instances =
                ServiceMock.Resource(s => s.RegionInstanceGroupManagers);

            instances.SetupRequest(
                item => item.ListManagedInstances(FakeProjectId, FakeRegionName, instanceGroupName),
                listResponse);

            Pipeline.Commands.AddScript(
                $"Wait-GceManagedInstanceGroup -Name {instanceGroupName} -Region {FakeRegionName}");
            Pipeline.Invoke();

            instances.VerifyAll();
        }