예제 #1
0
        public void ValidatorShouldHandleNoImplementationTechnologyGracefully()
        {
            ValidationResults results = new ValidationResults();
            TestFaultCollectionCrossModelValidator validator = new TestFaultCollectionCrossModelValidator(null);

            validator.TestDoValidate(operation.Faults, operation, string.Empty, results);

            Assert.IsTrue(results.IsValid);
        }
예제 #2
0
        public void TestInvalidScenarioForASMXAndDataContractSerializer()
        {
            scModel.ImplementationTechnology = new ServiceContractAsmxExtensionProvider();
            scModel.SerializerType           = Microsoft.Practices.ServiceFactory.ServiceContracts.SerializerType.DataContractSerializer;
            dcModel.ImplementationTechnology = new DataContractWcfExtensionProvider();

            ValidationResults results = new ValidationResults();
            TestFaultCollectionCrossModelValidator validator = new TestFaultCollectionCrossModelValidator(null);

            validator.TestDoValidate(operation.Faults, operation, string.Empty, results);

            Assert.IsFalse(results.IsValid);
        }
        public void TestInvalidScenarioForASMXAndDataContractSerializer()
        {
            scModel.ImplementationTechnology = new ServiceContractAsmxExtensionProvider();
            scModel.SerializerType = Microsoft.Practices.ServiceFactory.ServiceContracts.SerializerType.DataContractSerializer;
            dcModel.ImplementationTechnology = new DataContractWcfExtensionProvider();

            ValidationResults results = new ValidationResults();
            TestFaultCollectionCrossModelValidator validator = new TestFaultCollectionCrossModelValidator(null);
            validator.TestDoValidate(operation.Faults, operation, string.Empty, results);

            Assert.IsFalse(results.IsValid);
        }
		public void ValidatorShouldHandleNoImplementationTechnologyGracefully()
		{
			ValidationResults results = new ValidationResults();
			TestFaultCollectionCrossModelValidator validator = new TestFaultCollectionCrossModelValidator(null);
			validator.TestDoValidate(operation.Faults, operation, string.Empty, results);

			Assert.IsTrue(results.IsValid);
		}