Exemplo n.º 1
0
        private Task <bool> DoWork(DataCenterMetadata dcData)
        {
            if (!_shouldErrorOut.HasValue)
            {
                throw new System.Net.NetworkInformation.NetworkInformationException();
            }

            var taskSource = new TaskCompletionSource <bool>();

            taskSource.SetResult(_shouldErrorOut.Value);
            return(taskSource.Task);
        }
Exemplo n.º 2
0
 public void PrepareTest()
 {
     factory = new HttpClientTestFactory();
     client  = new EurekaClient(factory)
     {
         ApplicationName  = "DemoApp",
         EurekaServiceUrl = "http://ec2-174-129-161-75.compute-1.amazonaws.com/eureka"
     };
     dcData = new DataCenterMetadata()
     {
         InstanceId = "i-56755"
     };
 }
Exemplo n.º 3
0
 public Task <bool> Unregister(DataCenterMetadata dcData)
 {
     return(this.DoWork(dcData));
 }
Exemplo n.º 4
0
 public Task <bool> TakeInstanceOutOfService(DataCenterMetadata dcData)
 {
     return(this.DoWork(dcData));
 }
Exemplo n.º 5
0
 public Task <bool> SendHeartbeat(DataCenterMetadata dcData)
 {
     return(this.DoWork(dcData));
 }
Exemplo n.º 6
0
 public Task <bool> PutInstanceToService(DataCenterMetadata dcData)
 {
     return(this.DoWork(dcData));
 }