예제 #1
0
        public void It_returns_proper_fault_if_filter_dialect_is_not_supported()
        {
            var enumerationServer = new EnumerationServer()
                                    .Bind("supportedDialect", typeof(object), new Mock <IEnumerationRequestHandler>().Object);

            var soapClient        = new TestingSOAPClient(enumerationServer);
            var enumerationClient = new EnumerationClient(false, soapClient);

            try
            {
                enumerationClient
                .EnumerateEPR("http://tempuri.org", new Filter("unsupportedDialect", "A"), 10)
                .ToList();
            }
            catch (FaultException ex)
            {
                Assert.AreEqual(new NotSupportedDialectFaultException(), ex);
                return;
            }
            Assert.Fail();
        }
예제 #2
0
        public void It_returns_proper_fault_if_filter_dialect_is_not_supported()
        {
            var enumerationServer = new EnumerationServer()
                .Bind("supportedDialect", typeof (object), new Mock<IEnumerationRequestHandler>().Object);

            var soapClient = new TestingSOAPClient(enumerationServer);
            var enumerationClient = new EnumerationClient(false, soapClient);

            try
            {
                enumerationClient
                    .EnumerateEPR("http://tempuri.org", new Filter("unsupportedDialect", "A"), 10)
                    .ToList();            
            }
            catch (FaultException ex)
            {
                Assert.AreEqual(new NotSupportedDialectFaultException(), ex);
                return;
            }
            Assert.Fail();
        }