Add: RankingRecordManager
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
let historyRecordManager = new HistoryRecordManager();
|
||||
|
||||
historyRecordManager.push(new HistoryRecordData("05/10", 1000));
|
||||
historyRecordManager.push(new HistoryRecordData("05/11", 100));
|
||||
historyRecordManager.push(new HistoryRecordData("05/12", 200));
|
||||
historyRecordManager.push(new HistoryRecordData("05/13", 2000));
|
||||
historyRecordManager.push(new HistoryRecordData("05/14", 10000));
|
||||
historyRecordManager.push(new HistoryRecord("05/10", "space_invaders", 1000));
|
||||
historyRecordManager.push(new HistoryRecord("05/11", "typing_korean_basic", 100));
|
||||
historyRecordManager.push(new HistoryRecord("05/12", "cooking_meats", 200));
|
||||
historyRecordManager.push(new HistoryRecord("05/13", "typing_english_basic", 2000));
|
||||
historyRecordManager.push(new HistoryRecord("05/14", "test", 10000));
|
||||
|
||||
QUnit.test( "push", function( assert ) {
|
||||
assert.equal(historyRecordManager.count, 5);
|
||||
@@ -13,11 +13,14 @@ QUnit.test( "push", function( assert ) {
|
||||
QUnit.test( "getAt", function( assert ) {
|
||||
assert.equal(historyRecordManager.getDateAt(0), "05/10");
|
||||
assert.equal(historyRecordManager.getDateAt(4), "05/14");
|
||||
|
||||
assert.equal(historyRecordManager.getAppNameAt(0), "space_invaders");
|
||||
assert.equal(historyRecordManager.getAppNameAt(4), "test");
|
||||
});
|
||||
|
||||
QUnit.test( "clear", function( assert ) {
|
||||
let historyRecordManagerForClear = new HistoryRecordManager();
|
||||
historyRecordManagerForClear.push(new HistoryRecordData("05/10", 1));
|
||||
historyRecordManagerForClear.push(new HistoryRecord("05/10", "space_invaders", 1));
|
||||
historyRecordManagerForClear.clear();
|
||||
|
||||
assert.equal(historyRecordManagerForClear.count, 0);
|
||||
|
||||
Reference in New Issue
Block a user