public static void TestLoad() { BookMgr bookMgr = new BookMgr(); bookMgr.AddWord("Book1", "Hello", "Hello Han meimei"); bookMgr.AddWord("Book1", "Hello", "Hello Li Lei"); bookMgr.AddWord("Book1", "Hello", "Hello Liu han gang"); bookMgr.AddWord("Book1", "Fine", "Fine ,and you?"); bookMgr.AddBook("Book2"); bookMgr.AddWord("condition", "CG condition something about C"); bookMgr.AddWord("condition", "The Book condition Gold"); bookMgr.AddWord("container", "1container hahahah"); bookMgr.AddWord("container", "2container hahahah"); for (int i = 0; i < 10; i++) { bookMgr.AddWord("word1", "word1 context" + (i + 1).ToString()); } for (int i = 0; i < 7; i++) { bookMgr.AddWord("word2", "word2 context" + (i + 1).ToString()); } for (int i = 0; i < 5; i++) { bookMgr.AddWord("word3", "word3 context" + (i + 1).ToString()); } bookMgr.AddWord("Book2", "boss", "boss liu"); bookMgr.Save(); bookMgr.Load(); }
//public static void TestBook() //{ //} public static void TestBookMgr() { BookMgr bookMgr = new BookMgr(); bookMgr.AddWord("Book1", "Hello", "Hello Han meimei"); bookMgr.AddWord("Book1", "Hello", "Hello Li Lei"); bookMgr.AddWord("Book1", "Hello", "Hello Liu han gang"); bookMgr.AddWord("Book1", "Fine", "Fine ,and you?"); bookMgr.AddBook("Book2"); bookMgr.AddWord("condition", "CG condition something about C"); bookMgr.AddWord("condition", "The Book condition Gold"); bookMgr.AddWord("container", "1container hahahah"); bookMgr.AddWord("container", "2container hahahah"); for (int i = 0; i < 10; i++) { bookMgr.AddWord("word1", "word1 context" + (i + 1).ToString()); } for (int i = 0; i < 7; i++) { bookMgr.AddWord("word2", "word2 context" + (i + 1).ToString()); } for (int i = 0; i < 5; i++) { bookMgr.AddWord("word3", "word3 context" + (i + 1).ToString()); } bookMgr.AddWord("Book2", "boss", "boss liu"); List <WordVO> sortWord = bookMgr.GetWordWithSort("Default"); string str = ""; for (int i = 0; i < sortWord.Count; i++) { str += sortWord[i].DebugInfo(); } Debug.Log(str); //Debug.Log(bookMgr.DebugInfo()); }