public void Create_Instance_With_Type() { var exception = new ServiceResolutionException(typeof(string)); Assert.AreEqual(exception.ServiceType, typeof(string)); Assert.AreEqual(exception.Message, "Could not resolve serviceType 'System.String'"); throw exception; }
public void Create_Instance_With_Type_And_InnerException() { var operationException = new InvalidOperationException(); var exception = new ServiceResolutionException(typeof(string), operationException); Assert.AreEqual(exception.ServiceType, typeof(string)); Assert.AreEqual(exception.InnerException, operationException); Assert.AreEqual(exception.Message, "Could not resolve serviceType 'System.String'"); throw exception; }