public void TestAtCreateIntranetRepositoryFaultKasterArgumentNullExceptionHvisIntranetRepositoryExceptionErNull() { var service = new TestSerivce(); Assert.That(service, Is.Not.Null); Assert.Throws <ArgumentNullException>(() => service.GetIntranetRepositoryFault(null)); }
public void TestAtCreateIntranetSystemFaultKasterArgumentNullExceptionHvisUnhandledExceptionErNull() { var service = new TestSerivce(); Assert.That(service, Is.Not.Null); Exception exception = null; Assert.Throws <ArgumentNullException>(() => service.GetIntranetSystemFault(exception)); }
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)); }