public void Test_Cacu_Score() { //arrange string word_test = "JOCER"; List <int> score_test = new List <int>(); for (int i = 0; i < 52; i++) { score_test.Add(1); } int expect_score = 5; //act ScoreSort ss = new ScoreSort(); int act_score = ss.word_caculate(word_test, score_test); //assert Assert.AreEqual(expect_score, act_score, "Word score is caculated wrong"); }
public static ScoreSort BuildScoreSort(DataModel.Search.Sort.ScoreSort scoreSort) { ScoreSort.Builder builder = ScoreSort.CreateBuilder(); builder.SetOrder(BuildSortOrder(scoreSort.Order)); return(builder.Build()); }