public void Throw_if_not_hexadecimal(string hexadecimalString, string expectedNotAllowedCharacters) { Action act = () => HexadecimalService.ConvertToDecimal(hexadecimalString); act.Should() .Throw <ArgumentOutOfRangeException>() .WithMessage($"Only 0-9, A-F and whitespace allowed. Contains not allowed characters: {expectedNotAllowedCharacters} "); }
public void Converter_hexadecimal_to_decimal(string hexadecimalString, string expectedDecimalString) { var result = HexadecimalService.ConvertToDecimal(hexadecimalString); result.Should().Be(expectedDecimalString); }