예제 #1
0
        public void EncodingTest()
        {
            const string input = "Example string";

            var bytesToString = new BytesToString();

            var @bytes  = bytesToString.Decode(input);
            var decoded = bytesToString.Encode(@bytes);

            input.Should().Be(decoded);
        }
예제 #2
0
        public void EncodingTest()
        {
            const string input = "Example string";

            var base64        = new Base64();
            var bytesToString = new BytesToString();

            var data = bytesToString.Decode(input);

            var encodedResult = base64.Encode(data);
            var decodedBytes  = base64.Decode(encodedResult);

            var decodedResult = bytesToString.Encode(decodedBytes);

            data.Should().BeEquivalentTo(decodedBytes);
            input.Should().Be(decodedResult);
        }