Ejemplo n.º 1
0
        public void MapTopItemToPositions_Ok()
        {
            var mapTopItemToPosition = new MapTopItemToPositions();
            var positions            = mapTopItemToPosition.Map(new TopItem
            {
                DayRanking        = 1,
                Hits              = 12,
                Loved             = 1,
                Score             = 44,
                OverallDayRanking = 2,
                OverallHits       = 12,
                OverallLoved      = 0,
                OverallScore      = 24
            });

            Assert.AreEqual(1, positions.DailyPosition.Rank);
            Assert.AreEqual(12, positions.DailyPosition.Hits);
            Assert.AreEqual(1, positions.DailyPosition.NoOfLovedTracks);
            Assert.AreEqual(44, positions.DailyPosition.Score);
            Assert.AreEqual(2, positions.OverallPosition.Rank);
            Assert.AreEqual(12, positions.OverallPosition.Hits);
            Assert.AreEqual(0, positions.OverallPosition.NoOfLovedTracks);
            Assert.AreEqual(24, positions.OverallPosition.Score);
        }
Ejemplo n.º 2
0
 public void MapTopItemToPositions_Null_TopItem()
 {
     var mapTopItemToPositions = new MapTopItemToPositions();
     var position = mapTopItemToPositions.Map(null);
 }