Ejemplo n.º 1
0
        public void Encode_AShift1_OutputTextIs61()
        {
            var polybiusBase = new PolybiusBase
            {
                InputText = "a",
                Key       = 1,
                Operation = PolybiusBase.Operations.Encode
            };

            polybiusBase.Encode();
            Assert.Equal("61", polybiusBase.OutputText);
        }
Ejemplo n.º 2
0
        public void Encode_ACapitalizedShift0_OutputTextIs11()
        {
            var polybiusBase = new PolybiusBase
            {
                InputText = "A",
                Key       = 0,
                Operation = PolybiusBase.Operations.Encode
            };

            polybiusBase.Encode();
            Assert.Equal("11", polybiusBase.OutputText);
        }
Ejemplo n.º 3
0
        public void Encode_HelloShift0_OutputTextIsRight()
        {
            var polybiusBase = new PolybiusBase
            {
                InputText = "Hello Yo",
                Key       = 0,
                Operation = PolybiusBase.Operations.Encode
            };

            polybiusBase.Encode();
            Assert.Equal("2315323235 5535", polybiusBase.OutputText);
        }
Ejemplo n.º 4
0
        public void Encode_HShift0_OutputTextIs23()
        {
            var polybiusBase = new PolybiusBase
            {
                InputText = "h",
                Key       = 0,
                Operation = PolybiusBase.Operations.Encode
            };

            polybiusBase.Encode();
            Assert.Equal("23", polybiusBase.OutputText);
        }