CFEngine API

org.recommender.test
Class GetRecommendationsByTypeTest

java.lang.Object
  |
  +--org.recommender.test.GetRecommendationsByTypeTest

public class GetRecommendationsByTypeTest
extends java.lang.Object

Test for getRecommendationsByType()

Author:
Yun Wang

Constructor Summary
GetRecommendationsByTypeTest(CFEngine s)
           
 
Method Summary
 int fiftyItemTest1(int user)
          fiftyItemTest1() Get 20 items for 1 type, compare with predicted value and the one in DB
 int fiftyItemTest2(int user)
          fiftyItemTest2() Get 50 items for 3 types, compare with predicted value and the one in DB
 int illegalParamTest()
          illegalParamTest() 1.
 int multiUserTest1()
          multiUserTest1() Test 5 users for 10 recommendations: 1.
 int multiUserTest2()
          multiUserTest2() Test 5 users for 20 recommendations: 1.
 int multiUserTest3()
          multiUserTest3() Test 5 users for 50 recommendations.
 int tenItemTest1(int user)
          tenItemTest1() Get 10 items for 1 type, compare with predicted value and the one in DB
 int tenItemTest2(int user)
          tenItemTest2() Get 10 items for 3 types, compare with predicted value and the one in DB
 void testSeq()
          testSeq()
 int twentyItemTest1(int user)
          twentyItemTest1() Get 20 items for 1 type, compare with predicted value and the one in DB
 int twentyItemTest2(int user)
          twentyItemTest2() Get 20 items for 3 types, compare with predicted value and the one in DB
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetRecommendationsByTypeTest

public GetRecommendationsByTypeTest(CFEngine s)
Method Detail

tenItemTest1

public int tenItemTest1(int user)
tenItemTest1() Get 10 items for 1 type, compare with predicted value and the one in DB

Returns:
int

tenItemTest2

public int tenItemTest2(int user)
tenItemTest2() Get 10 items for 3 types, compare with predicted value and the one in DB

Returns:
int

twentyItemTest1

public int twentyItemTest1(int user)
twentyItemTest1() Get 20 items for 1 type, compare with predicted value and the one in DB

Returns:
int

twentyItemTest2

public int twentyItemTest2(int user)
twentyItemTest2() Get 20 items for 3 types, compare with predicted value and the one in DB

Returns:
int

fiftyItemTest1

public int fiftyItemTest1(int user)
fiftyItemTest1() Get 20 items for 1 type, compare with predicted value and the one in DB

Returns:
int

fiftyItemTest2

public int fiftyItemTest2(int user)
fiftyItemTest2() Get 50 items for 3 types, compare with predicted value and the one in DB

Returns:
int

multiUserTest1

public int multiUserTest1()
multiUserTest1() Test 5 users for 10 recommendations: 1. offset 0 2. offset 20

Returns:
int

multiUserTest2

public int multiUserTest2()
multiUserTest2() Test 5 users for 20 recommendations: 1. offset 5 2. offset 30

Returns:
int

multiUserTest3

public int multiUserTest3()
multiUserTest3() Test 5 users for 50 recommendations. 1. offset 10 2. offset 60

Returns:
int

illegalParamTest

public int illegalParamTest()
illegalParamTest() 1. item < 1 and item > maxItem 2. user < 1 and user > maxUser 3. offset < 0 4. type < 0 and type > maxType


testSeq

public void testSeq()
testSeq()


CFEngine API

Copyright © 2003 - Oregon State University www.orst.edu