Ejemplo n.º 1
0
        public void TestNoRatingModeler()
        {
            Trace.WriteLine("Running NoRating Test.");
             var profile = new MockNoRatingsUserProfile();
             var session = _context.CreateModelingSession(profile);

             var set = session.Generate(5, 3); //Test for balanced model
             Assert.AreEqual(5, set.RecipeIds.Length);
        }
Ejemplo n.º 2
0
        public void TestNoRatingModeler()
        {
            Trace.WriteLine("Running NoRating Test.");
            var profile = new MockNoRatingsUserProfile();
            var session = this.context.CreateModelingSession(profile);

            Trace.WriteLine("Running NoRatingModel Test (Efficient)");
            var efficientSet = session.Generate(5, 1); // Test for most efficient set
            Assert.AreEqual(5, efficientSet.RecipeIds.Length);

            Trace.WriteLine("Running NoRatingModel Test (Balanced)");
            var balancedSet = session.Generate(5, 3); // Test for balanced model
            Assert.AreEqual(5, balancedSet.RecipeIds.Length);

            Trace.WriteLine("Running NoRatingModel Test (Recommended)");
            var ratedSet = session.Generate(5, 5); // Test for recipes user most likely to rate highly (basically get suggestions, ignore pantry)
            Assert.AreEqual(5, ratedSet.RecipeIds.Length);
        }