Exemplo n.º 1
0
        public void EncoderDecoder_RoundTrip()
        {
            StringReordering sr     = new StringReordering();
            String           input  = StringGenerator.GetString(StringType.Sentence);
            String           output = sr.Encode(input);
            String           actual = sr.Decode(output);

            Assert.AreEqual(input, actual);
        }
Exemplo n.º 2
0
        public void DecoderTest(String expected, String input)
        {
            StringReordering sr     = new StringReordering();
            String           output = sr.Decode(input);

            Assert.IsNotNull(output);
            Assert.AreNotEqual(input, output);
            Assert.AreEqual(expected, output);
        }
Exemplo n.º 3
0
        public void EncodeTest_Basic()
        {
            StringReordering sr     = new StringReordering();
            String           input  = "this is a test string";
            String           output = sr.Encode(input);

            Assert.IsNotNull(output);
            Assert.AreNotEqual(input, output);
        }