public void When_DecodingToGuid_Invalid_HashId_Should_ThrowException(string valueToDecode) { // Arrange var _sut = new HashingService(AllowedCharacters, Hashstring); //Act Action testDelegate = () => _sut.DecodeValueToGuid(valueToDecode); //Assert testDelegate.ShouldThrow <ArgumentException>(); }
public void Then_Guid_HashValue_Should_Equal_DecodeValue(string hashValue) { // Arrange var _sut = new HashingService(AllowedCharacters, Hashstring); //Act Guid expectedValue = Guid.Parse(hashValue); var hash = _sut.HashValue(expectedValue); var actualValue = _sut.DecodeValueToGuid(hash); //Assert expectedValue.Should().Be(actualValue); }