Example #1
0
        public void TestGetMatchesForFalse()
        {
            MatchesFinder    finder = new MatchesFinder();
            List <DataPoint> micro  = new List <DataPoint>();
            List <DataPoint> song   = new List <DataPoint>();

            micro.Add(new DataPoint(1.0, 123, 1));
            song.Add(new DataPoint(2.0, 123, 1));
            double expected = 2;
            double result   = finder.getMatches(micro, song).totalMatches;

            Assert.AreNotEqual(expected, result);
        }
        private List <Match> findMatches(List <DataPoint> dataCheck, List <Song> songs)
        {
            if (songs == null)
            {
                return(null);
            }
            matchesFinder = new MatchesFinder();
            List <Match> matches = new List <Match>();
            int          n       = 0;

            foreach (var song in songs)
            {
                matches.Add(new Match(Path.GetFileNameWithoutExtension(song.songName), matchesFinder.getMatches(dataCheck, song.points)));
            }
            return(matches);
        }