Ejemplo n.º 1
0
        public void Test_GetStringWithCommonChars2_IsEmpty()
        {
            Q3 objInterview = new Q3();

            char[] ch1      = "".ToCharArray();
            char[] ch2      = "".ToCharArray();
            string expected = "";
            string actual   = objInterview.GetStringWithCommonChars2(ch1, ch2);

            Assert.AreEqual(actual, expected);
        }
Ejemplo n.º 2
0
        public void Test_GetStringWithCommonChars2_withoutRepeatedChars()
        {
            Q3 objInterview = new Q3();

            char[] ch1      = { 'a', 's', 't', 'c', 'i', 'n', 'g' };
            char[] ch2      = { 'g', 'f', 'c', 'w', 'e', 'n', 'a' };
            string expected = "acng";
            string actual   = objInterview.GetStringWithCommonChars2(ch1, ch2);

            Assert.AreEqual(actual, expected);
        }
Ejemplo n.º 3
0
        public void Test_GetStringWithCommonChars2_IsNull()
        {
            Q3 objInterview = new Q3();

            char[] ch1      = null;
            char[] ch2      = null;
            string expected = "";
            string actual   = objInterview.GetStringWithCommonChars2(ch1, ch2);

            Assert.AreEqual(actual, expected);
        }