Пример #1
0
        public void TestAtCreateIntranetRepositoryFaultKasterArgumentNullExceptionHvisIntranetRepositoryExceptionErNull()
        {
            var service = new TestSerivce();

            Assert.That(service, Is.Not.Null);
            Assert.Throws <ArgumentNullException>(() => service.GetIntranetRepositoryFault(null));
        }
Пример #2
0
        public void TestAtCreateIntranetSystemFaultKasterArgumentNullExceptionHvisUnhandledExceptionErNull()
        {
            var service = new TestSerivce();

            Assert.That(service, Is.Not.Null);
            Exception exception = null;

            Assert.Throws <ArgumentNullException>(() => service.GetIntranetSystemFault(exception));
        }
Пример #3
0
        public void TestAtCreateIntranetBusinessFaultDannerIntranetBusinessFault()
        {
            var service = new TestSerivce();

            Assert.That(service, Is.Not.Null);

            var exception = new IntranetBusinessException("Test", new NotSupportedException());
            var fault     = service.GetIntranetBusinessFault(exception);

            Assert.That(fault, Is.Not.Null);
            Assert.That(fault, Is.TypeOf(typeof(FaultException <IntranetBusinessFault>)));
            Assert.That(fault.Reason, Is.Not.Null);
            Assert.That(fault.Reason, Is.TypeOf(typeof(FaultReason)));
            Assert.That(fault.Reason.ToString(), Is.EqualTo(exception.Message));
        }