Пример #1
0
        public void TestLiteralStringWithEmpty()
        {
            var inputString = "";
            HandleInputLiteralString handleInputLiteralString = new HandleInputLiteralString();
            var result = handleInputLiteralString.Process(inputString);

            Assert.True(result.Count == 0);
        }
Пример #2
0
        public void TestLiteralStringWithNormalCase()
        {
            var inputString = "thisis a samplestring";
            HandleInputLiteralString handleInputLiteralString = new HandleInputLiteralString();
            var result = handleInputLiteralString.Process(inputString);

            Assert.True(result['a'] == 2);
            Assert.True(result['i'] == 3);
            Assert.True(result['t'] == 2);
        }
Пример #3
0
        public void TestLiteralStringWithCasensitive()
        {
            var inputString = "Hello Howa and hello Test";
            HandleInputLiteralString handleInputLiteralString = new HandleInputLiteralString();
            var result = handleInputLiteralString.Process(inputString);

            Assert.True(result['H'] == 2);
            Assert.True(result['h'] == 1);
            Assert.True(result['t'] == 1);
        }
Пример #4
0
        public void TestLiteralStringWithOtherCase()
        {
            var inputString = "I am n0thing m0r3 than a string.I t00 hav3 a l3xic0graphic 0rd3r.";
            HandleInputLiteralString handleInputLiteralString = new HandleInputLiteralString();
            var result = handleInputLiteralString.Process(inputString);

            Assert.True(result['a'] == 6);
            Assert.True(result['t'] == 4);
            Assert.True(result['x'] == 1);
        }