Exemplo n.º 1
0
        public void SerializeAndEncode_CreatesCorrectEncodedString_IfNonNullEncodingKey()
        {
            var data = new CrossApplicationRequestData("guid", false, "tripId", "pathHash");

            var encoded = HeaderEncoder.EncodeSerializedData(JsonConvert.SerializeObject(data), "encodingKey");

            Assert.AreEqual("PkwEGg0NTEstBBUWC09NEBsHFwIBW0lMEw4QASYGOA1bOA==", encoded);
        }
Exemplo n.º 2
0
        public void SerializeAndEncode_CreatesCorrectEncodedString_IfNullEncodingKey()
        {
            var data = new CrossApplicationRequestData("guid", false, "tripId", "pathHash");

            var encoded = HeaderEncoder.EncodeSerializedData(JsonConvert.SerializeObject(data), null);

            Assert.AreEqual("WyJndWlkIixmYWxzZSwidHJpcElkIiwicGF0aEhhc2giXQ==", encoded);
        }