public static CompositionError CreateImportCardinalityMismatch(ImportCardinalityMismatchException exception, ImportDefinition definition) { Assumes.NotNull(exception, definition); return(CompositionError.Create( CompositionErrorId.ImportEngine_ImportCardinalityMismatch, exception.Message, definition.ToElement(), (Exception)null)); }
public static CompositionError CreateImportCardinalityMismatch(ImportCardinalityMismatchException exception, ImportDefinition definition) { Assumes.NotNull(exception, definition); return CompositionError.Create( CompositionErrorId.ImportEngine_ImportCardinalityMismatch, exception.Message, definition.ToElement(), (Exception)null); }
public void Constructor3_ValueAsMessageArgument_ShouldSetMessageProperty() { var expectations = Expectations.GetExceptionMessages(); foreach (var e in expectations) { var exception = new ImportCardinalityMismatchException(e, new Exception()); Assert.Equal(e, exception.Message); } }
public void Constructor3_ValueAsMessageArgument_ShouldSetMessageProperty() { var expectations = Expectations.GetExceptionMessages(); foreach (var e in expectations) { var exception = new ImportCardinalityMismatchException(e, new Exception()); Assert.AreEqual(e, exception.Message); } }
public void Constructor3_ValueAsInnerExceptionArgument_ShouldSetInnerExceptionProperty() { var expectations = Expectations.GetInnerExceptions(); foreach (var e in expectations) { var exception = new ImportCardinalityMismatchException("Message", e); Assert.Same(e, exception.InnerException); } }
public static CompositionError CreateImportCardinalityMismatch(ImportCardinalityMismatchException exception, ImportDefinition definition) { if (exception == null) { throw new ArgumentNullException(nameof(exception)); } if (definition == null) { throw new ArgumentNullException(nameof(definition)); } return(CompositionError.Create( CompositionErrorId.ImportEngine_ImportCardinalityMismatch, exception.Message, definition.ToElement(), (Exception?)null)); }
public void Constructor3_NullAsInnerExceptionArgument_ShouldSetInnerExceptionPropertyToNull() { var exception = new ImportCardinalityMismatchException("Message", (Exception)null); Assert.Null(exception.InnerException); }
public void Constructor2_ShouldSetInnerExceptionPropertyToNull() { var exception = new ImportCardinalityMismatchException("Message"); Assert.Null(exception.InnerException); }
public void Constructor3_NullAsMessageArgument_ShouldSetMessagePropertyToDefault() { var exception = new ImportCardinalityMismatchException((string)null, new Exception()); ExceptionAssert.HasDefaultMessage(exception); }
public void Constructor1_ShouldSetMessagePropertyToDefault() { var exception = new ImportCardinalityMismatchException(); ExceptionAssert.HasDefaultMessage(exception); }
public ImportCardinalityMismatchExceptionDebuggerProxy(ImportCardinalityMismatchException exception) { Requires.NotNull(exception, "exception"); this._exception = exception; }
public void Constructor2_ShouldSetInnerExceptionPropertyToNull() { var exception = new ImportCardinalityMismatchException("Message"); Assert.IsNull(exception.InnerException); }
public ImportCardinalityMismatchExceptionDebuggerProxy(ImportCardinalityMismatchException exception) { Requires.NotNull(exception, nameof(exception)); _exception = exception; }
public void Constructor3_NullAsInnerExceptionArgument_ShouldSetInnerExceptionPropertyToNull() { var exception = new ImportCardinalityMismatchException("Message", (Exception)null); Assert.IsNull(exception.InnerException); }
public static CompositionError CreateImportCardinalityMismatch(ImportCardinalityMismatchException exception !!, ImportDefinition definition !!)
public void Constructor3_ValueAsInnerExceptionArgument_ShouldSetInnerExceptionProperty() { var expectations = Expectations.GetInnerExceptions(); foreach (var e in expectations) { var exception = new ImportCardinalityMismatchException("Message", e); Assert.AreSame(e, exception.InnerException); } }