public void Then_AlphaNumeric_HashId_Should_Equal_Decode_Value(string hashId) { //Act var _sut = new HashingService(AllowedCharacters, Hashstring); var encodedValue = _sut.HashValue(hashId); var decodedValue = _sut.DecodeValueToString(encodedValue); //Assert hashId.Should().Be(decodedValue); }
public void Then_Decoding_Invalid_String_HashId_Should_ThrowException(string hashId) { // Arrange var _sut = new HashingService(AllowedCharacters, Hashstring); //Act Action testDelegate = () => _sut.DecodeValueToString(hashId); //Assert testDelegate.ShouldThrow <ArgumentException>(); }