public static void GetErrorCodesVector___Should_return_null___When_parameter_exception_Data_is_null() { // Arrange, var exception = new ExceptionWithNoData(); // Act var actual = exception.GetErrorCodesVector(); // Assert actual.Should().BeNull(); }
public static void AddErrorCode__Should_throw_ArgumentNullException___When_parameter_exception_Data_is_null() { // Arrange var errorCode = A.Dummy <string>(); var exception = new ExceptionWithNoData(); // Act var actual = Record.Exception(() => exception.AddErrorCode(errorCode)); // Assert actual.Should().BeOfType <ArgumentNullException>(); actual.Message.Should().Contain("exception.Data"); }