Example #1
0
        public void Compare_Opposite()
        {
            var result = FrequencyAnalysis.Compare(
                new Dictionary <char, double>
            {
                { 'A', 0.2 },
                { 'B', 0.8 },
            },
                new Dictionary <char, double>
            {
                { 'C', 0.3 },
                { 'D', 0.7 },
            }
                );

            Assert.AreEqual(0, result);
        }
Example #2
0
        public void Compare_Identical()
        {
            var result = FrequencyAnalysis.Compare(
                new Dictionary <char, double>
            {
                { 'A', 0.2 },
                { 'B', 0.5 },
                { 'C', 0.3 },
            },
                new Dictionary <char, double>
            {
                { 'A', 0.2 },
                { 'B', 0.5 },
                { 'C', 0.3 },
            }
                );

            Assert.AreEqual(1, result);
        }