public void ConsolidateByInheritanceTests()
        {
            // Arrange
            var c1 = ContractDescription.GetContract(typeof(Contract1));
            var c2 = ContractDescription.GetContract(typeof(Contract2));
            IDictionary <string, ContractDescription> contracts = new Dictionary <string, ContractDescription>
            {
                { typeof(Contract1).FullName, c1 },
                { typeof(Contract2).FullName, c2 }
            };

            // Act
            ContractConsolidator.ConsolidateByInheritance(contracts);

            //Assert
            Assert.AreEqual(typeof(Contract2).FullName, contracts.Keys.Single());
            Assert.AreEqual(c2, contracts.Values.Single());
        }
        public void ConsolidateByAttributeTests()
        {
            // Arrange
            var attribute = new CustomWebServiceAttribute {
                ServiceContract = typeof(Contract1)
            };
            var c1 = ContractDescription.GetContract(typeof(Contract1));
            var c2 = ContractDescription.GetContract(typeof(Contract2));
            IDictionary <string, ContractDescription> contracts = new Dictionary <string, ContractDescription>
            {
                { typeof(Contract1).FullName, c1 },
                { typeof(Contract2).FullName, c2 }
            };

            // Act
            ContractConsolidator.ConsolidateByAttribute(attribute, contracts);

            //Assert
            Assert.AreEqual(typeof(Contract1).FullName, contracts.Keys.Single());
            Assert.AreEqual(c1, contracts.Values.Single());
        }