public void GetServicesWithContractType()
        {
            // Setup
            var listing = new ServiceContractListing();
            var contractType = typeof (ServiceBase);
            var service = new TestService { Contract = contractType, Name = "Service1" };
            listing.Add(service);

            // Execute
            var result = listing.GetServices(contractType);

            // Assert
            Assert.IsNotNull(result);
            Assert.IsTrue(result.Contains(service));
        }
        public void GetServicesWithNullContractType()
        {
            // Setup
            var listing = new ServiceContractListing();
            var contractType = typeof(ServiceBase);
            var service = new TestService { Contract = contractType, Name = "Service1" };
            listing.Add(service);

            // Execute
            listing.GetServices(a_contract: null);
        }
        public void GetNonExistingServicesWithContractType()
        {
            // Setup
            var listing = new ServiceContractListing();
            var contractType = typeof(ServiceBase);

            // Execute
            var result = listing.GetServices(contractType);

            // Assert
            Assert.IsFalse(result.Any());
        }