public void LongEncode_CanDecodeEncodedLong() { // Arrange var encoder = new LongEncode(ValidSecret); var expected = (long)123456789; // Act var encoded = encoder.Encode(expected); var result = encoder.Decode(encoded); // Assert Assert.Equal(expected, result); }
public void LongEncode_CantDecodeDecodWithInvalidSecret() { // Arrange var validEncoder = new LongEncode(ValidSecret); var invalidEncoder = new LongEncode(InvalidSecret); var expected = (long)123456789; // Act var encoded = validEncoder.Encode(expected); var result = invalidEncoder.Decode(encoded); // Assert Assert.NotEqual(expected, result); }