public void Encoder_Should_Ignore_Encoded_String() { var encoder = new TableKeyEncoder(); var mappedEncoding = encoder.InvalidCharactersMap['/']; var encodedString = $"$ENC_xyz{mappedEncoding}123_22_h"; var reEncodedString = encoder.EncodeTableKey(encodedString); Assert.AreEqual(encodedString, reEncodedString); }
public void Encoder_Should_Encode_Question_Mark() { var encoder = new TableKeyEncoder(); const string rawString = "xyz?123"; var mappedEncoding = encoder.InvalidCharactersMap['?']; var manualEncoding = $"$ENC_xyz{mappedEncoding}123"; var encodedString = encoder.EncodeTableKey(rawString); Assert.AreEqual(manualEncoding, encodedString); }
public void Encoder_Should_Encode_Forward_Slash() { var encoder = new TableKeyEncoder(); const string rawString = "xyz/123"; var mappedEncoding = encoder.InvalidCharactersMap['/']; var manualEncoding = $"$ENC_xyz{mappedEncoding}123"; var encodedString = encoder.EncodeTableKey(rawString); Assert.AreEqual(manualEncoding, encodedString); }