예제 #1
0
        public void testIsEqualsNumerOfWordNullCheck()
        {
            IComparator      comparator = new NumberOfWordComparator();
            ComparationInput input      = new ComparationInput();

            input.filename1 = "filename1";
            input.filename2 = "filename2";

            ComparationResult result = comparator.compare(input);

            Assert.AreEqual(1, result.score);
            Assert.AreEqual(0.5, result.weigth);
            Assert.AreEqual(input.filename1, result.filename1);
            Assert.AreEqual(input.filename2, result.filename2);
        }
예제 #2
0
        public void testIsNotEqualsNumerOfWordMix()
        {
            IComparator      comparator = new NumberOfWordComparator();
            ComparationInput input      = new ComparationInput();

            input.filename1 = "filename1";
            input.filename2 = "filename2";
            input.file1     = "testtest.test";
            input.file2     = "estt.estte   stt";

            ComparationResult result = comparator.compare(input);

            Assert.AreEqual(0, result.score);
            Assert.AreEqual(0.5, result.weigth);
            Assert.AreEqual(input.filename1, result.filename1);
            Assert.AreEqual(input.filename2, result.filename2);
        }