Example #1
0
 public void GetAnInstanceOfAnUnknownService()
 {
     //Query for a service instance
     ServiceInstanceDescriptor serviceInstance = MagellanClient.GetServiceInstance(new ServiceInstanceQuery()
     {
         Service = "super-service-of-doom"
     });
 }
Example #2
0
        public void GetAnInstanceOfAService()
        {
            //Query for a service instance
            ServiceInstanceDescriptor serviceInstance = MagellanClient.GetServiceInstance(new ServiceInstanceQuery()
            {
                Service = "test-service"
            });

            //Possible service instances
            IEnumerable <AgentServiceRegistration> possibleInstances = Services.Where(s => s.Name == "test-service" && s.Check == null);

            //Check whether a valid service instance was returned
            Assert.IsTrue(possibleInstances.Where(pi => pi.ID == serviceInstance.InstanceId).Count() == 1);
        }