public void TestInitializationWithServiceTypeAndComponent() { Type serviceType = typeof(Foo); Foo2 component = new Foo2(); ServiceMissingException exception = new ServiceMissingException(serviceType, component); Assert.IsTrue(exception.Message.Contains(serviceType.ToString())); Assert.IsTrue(exception.Message.Contains(component.ToString())); }
public void TestInitializationWithServiceTypeAndComponentAndInnerException() { Type serviceType = typeof(Foo); Foo2 component = new Foo2(); Exception innerException = new Exception(); ServiceMissingException exception = new ServiceMissingException(serviceType, component, innerException); Assert.IsTrue(exception.Message.Contains(serviceType.ToString())); Assert.IsTrue(exception.Message.Contains(component.ToString())); Assert.AreEqual(innerException, exception.InnerException); }
public void TestInitializationWithServiceTypeAndComponentAndInnerException() { Type serviceType = typeof (Foo); Foo2 component = new Foo2(); Exception innerException = new Exception(); ServiceMissingException exception = new ServiceMissingException(serviceType, component, innerException); Assert.IsTrue(exception.Message.Contains(serviceType.ToString())); Assert.IsTrue(exception.Message.Contains(component.ToString())); Assert.AreEqual(innerException, exception.InnerException); }
public void TestInitializationWithServiceTypeAndComponent() { Type serviceType = typeof (Foo); Foo2 component = new Foo2(); ServiceMissingException exception = new ServiceMissingException(serviceType, component); Assert.IsTrue(exception.Message.Contains(serviceType.ToString())); Assert.IsTrue(exception.Message.Contains(component.ToString())); }