Esempio n. 1
0
        public void Differences_between_been_oheen()
        {
            // arrange
            string firstTestWord  = "been";
            string secondTestWord = "oheen";
            string resultMustBe   = "[oh](b)een";

            // act
            string res = DiffClass.GetStringOfDiff(firstTestWord, secondTestWord);

            // assert
            Assert.AreEqual(resultMustBe, res);
        }
Esempio n. 2
0
        public void Differences_between_lil_bil()
        {
            // arrange
            string firstTestWord  = "lil";
            string secondTestWord = "bil";
            string resultMustBe   = "[b](l)il";

            // act
            string res = DiffClass.GetStringOfDiff(firstTestWord, secondTestWord);

            // assert
            Assert.AreEqual(resultMustBe, res);
        }
Esempio n. 3
0
        public void Differences_between_selete_delete()
        {
            // arrange
            string firstTestWord  = "selete";
            string secondTestWord = "delete";
            string resultMustBe   = "[d](s)elete";

            // act
            string res = DiffClass.GetStringOfDiff(firstTestWord, secondTestWord);

            // assert
            Assert.AreEqual(resultMustBe, res);
        }
Esempio n. 4
0
        public void Differences_between_spring_sprugn()
        {
            // arrange
            string firstTestWord  = "spring";
            string secondTestWord = "sprugn";
            string resultMustBe   = "spr[ug](i)n(g)";

            // act
            string res = DiffClass.GetStringOfDiff(firstTestWord, secondTestWord);

            // assert
            Assert.AreEqual(resultMustBe, res);
        }
Esempio n. 5
0
        public void Differences_between_fool_fouulish()
        {
            // arrange
            string firstTestWord  = "fool";
            string secondTestWord = "fouulish";
            string resultMustBe   = "fo[uu](o)l[ish]";
            //diff.SetOnlyStrings(firstTestWord, secondTestWord);

            // act
            string res = DiffClass.GetStringOfDiff(firstTestWord, secondTestWord);

            // assert
            Assert.AreEqual(resultMustBe, res);
        }
Esempio n. 6
0
        public void Differences_between_LilPUmP_LIgpuMp()
        {
            // arrange
            string firstTestWord  = "LilPUmP";
            string secondTestWord = "LIgpuMp";
            string resultMustBe   = "L[IgpuMp](ilPUmP)";


            // act
            string res = DiffClass.GetStringOfDiff(firstTestWord, secondTestWord);

            // assert
            Assert.AreEqual(resultMustBe, res);
        }
Esempio n. 7
0
        static void Main(string[] args)
        {
            string firstFilePath  = args[0];
            string secondFilePath = args[1];

            try
            {
                if (!File.Exists(firstFilePath) || !File.Exists(secondFilePath))
                {
                    throw new FileExistException("Couldn't find file(s)");
                }

                string firstText  = File.ReadAllText(firstFilePath);
                string secondText = File.ReadAllText(secondFilePath);
                string diffText   = DiffClass.GetStringOfDiff(firstText, secondText);

                Console.WriteLine(diffText);
                Console.ReadLine();
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Error: {ex.Message}");
            }
        }