public void DoValidateCollectionItemSucceedsForUniqueNamedElements()
		{
			Store store = new Store(typeof(CoreDesignSurfaceDomainModel), typeof(ServiceContractDslDomainModel));
			ServiceContractModel model;

			using (Transaction transaction = store.TransactionManager.BeginTransaction())
			{
				model = store.ElementFactory.CreateElement(ServiceContractModel.DomainClassId) as ServiceContractModel;

				ServiceContract contract = store.ElementFactory.CreateElement(ServiceContract.DomainClassId) as ServiceContract;
				contract.Name = "Contract Name";

				Operation part = store.ElementFactory.CreateElement(Operation.DomainClassId) as Operation;
				part.Name = "Part Name";

				contract.Operations.Add(part);

				TestableOperationElementCollectionValidator target = new TestableOperationElementCollectionValidator();

				ValidationResults results = new ValidationResults();
				target.TestDoValidateCollectionItem(part, contract, String.Empty, results);

				Assert.IsTrue(results.IsValid);

				transaction.Commit();
			}
		}
        public void DoValidateCollectionItemSucceedsForUniqueNamedElements()
        {
            Store store = new Store(typeof(CoreDesignSurfaceDomainModel), typeof(ServiceContractDslDomainModel));
            ServiceContractModel model;

            using (Transaction transaction = store.TransactionManager.BeginTransaction())
            {
                model = store.ElementFactory.CreateElement(ServiceContractModel.DomainClassId) as ServiceContractModel;

                ServiceContract contract = store.ElementFactory.CreateElement(ServiceContract.DomainClassId) as ServiceContract;
                contract.Name = "Contract Name";

                Operation part = store.ElementFactory.CreateElement(Operation.DomainClassId) as Operation;
                part.Name = "Part Name";

                contract.Operations.Add(part);

                TestableOperationElementCollectionValidator target = new TestableOperationElementCollectionValidator();

                ValidationResults results = new ValidationResults();
                target.TestDoValidateCollectionItem(part, contract, String.Empty, results);

                Assert.IsTrue(results.IsValid);

                transaction.Commit();
            }
        }