Beispiel #1
0
        public void Encoder_Should_Decode_Question_Mark_Encoding()
        {
            var          encoder        = new TableKeyEncoder();
            var          mappedEncoding = encoder.InvalidCharactersMap['?'];
            var          encodedString  = $"$ENC_xyz{mappedEncoding}123";
            var          decodedString  = encoder.DecodeTableKey(encodedString);
            const string manualDecoded  = "xyz?123";

            Assert.AreEqual(manualDecoded, decodedString);
        }
Beispiel #2
0
        public void Encoder_Should_Ignore_Regular_Underscores()
        {
            var          encoder        = new TableKeyEncoder();
            var          mappedEncoding = encoder.InvalidCharactersMap['/'];
            var          encodedString  = $"$ENC_xyz{mappedEncoding}123_22_h";
            var          decodedString  = encoder.DecodeTableKey(encodedString);
            const string manualDecoded  = "xyz/123_22_h";

            Assert.AreEqual(manualDecoded, decodedString);
        }