public void testRecommender() { IRecommender recommender = new RandomRecommender(getDataModel()); IList<IRecommendedItem> recommended = recommender.Recommend(1, 1); Assert.NotNull(recommended); Assert.AreEqual(1, recommended.Count); IRecommendedItem firstRecommended = recommended[0]; Assert.AreEqual(2, firstRecommended.GetItemID()); recommender.Refresh(null); Assert.AreEqual(2, firstRecommended.GetItemID()); }
public void testRecommender() { IRecommender recommender = new RandomRecommender(getDataModel()); IList <IRecommendedItem> recommended = recommender.Recommend(1, 1); Assert.NotNull(recommended); Assert.AreEqual(1, recommended.Count); IRecommendedItem firstRecommended = recommended[0]; Assert.AreEqual(2, firstRecommended.GetItemID()); recommender.Refresh(null); Assert.AreEqual(2, firstRecommended.GetItemID()); }