cleanup Lawnchair dep injection

This commit is contained in:
Tankred Hase 2013-05-31 13:09:49 +02:00
parent 9a7e87d33e
commit 0fb0e7c1e7
5 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
/** /**
* Handles generic caching of JSON objects in a lawnchair adapter * Handles generic caching of JSON objects in a lawnchair adapter
*/ */
app.dao.LawnchairDAO = function(window) { app.dao.LawnchairDAO = function(Lawnchair) {
'use strict'; 'use strict';
var db = new Lawnchair({ var db = new Lawnchair({

View File

@ -11,7 +11,7 @@ var devicestorage_test = {
asyncTest("Init", 3, function() { asyncTest("Init", 3, function() {
// init dependencies // init dependencies
devicestorage_test.util = new cryptoLib.Util(window, uuid); devicestorage_test.util = new cryptoLib.Util(window, uuid);
devicestorage_test.jsonDao = new app.dao.LawnchairDAO(window); devicestorage_test.jsonDao = new app.dao.LawnchairDAO(Lawnchair);
devicestorage_test.crypto = new app.crypto.Crypto(window, devicestorage_test.util); devicestorage_test.crypto = new app.crypto.Crypto(window, devicestorage_test.util);
devicestorage_test.storage = new app.dao.DeviceStorage(devicestorage_test.util, devicestorage_test.crypto, devicestorage_test.jsonDao, null); devicestorage_test.storage = new app.dao.DeviceStorage(devicestorage_test.util, devicestorage_test.crypto, devicestorage_test.jsonDao, null);
ok(devicestorage_test.storage, 'DeviceStorageDAO'); ok(devicestorage_test.storage, 'DeviceStorageDAO');

View File

@ -11,7 +11,7 @@ var emaildao_test = {
asyncTest("Init", 3, function() { asyncTest("Init", 3, function() {
// init dependencies // init dependencies
var util = new cryptoLib.Util(window, uuid); var util = new cryptoLib.Util(window, uuid);
var jsonDao = new app.dao.LawnchairDAO(window); var jsonDao = new app.dao.LawnchairDAO(Lawnchair);
emaildao_test.crypto = new app.crypto.Crypto(window, util); emaildao_test.crypto = new app.crypto.Crypto(window, util);
emaildao_test.storage = new app.dao.DeviceStorage(util, emaildao_test.crypto, jsonDao, null); emaildao_test.storage = new app.dao.DeviceStorage(util, emaildao_test.crypto, jsonDao, null);
// cloud storage stub // cloud storage stub

View File

@ -11,7 +11,7 @@ var keychaindao_test = {
asyncTest("Init", 2, function() { asyncTest("Init", 2, function() {
// init dependencies // init dependencies
var util = new cryptoLib.Util(window, uuid); var util = new cryptoLib.Util(window, uuid);
var jsonDao = new app.dao.LawnchairDAO(window); var jsonDao = new app.dao.LawnchairDAO(Lawnchair);
var crypto = new app.crypto.Crypto(window, util); var crypto = new app.crypto.Crypto(window, util);
// cloud storage stub // cloud storage stub
var cloudstorageStub = { var cloudstorageStub = {

View File

@ -4,7 +4,7 @@ var lawnchairdao_test = {};
asyncTest("Init", 2, function() { asyncTest("Init", 2, function() {
// init dependencies // init dependencies
lawnchairdao_test.jsonDao = new app.dao.LawnchairDAO(window); lawnchairdao_test.jsonDao = new app.dao.LawnchairDAO(Lawnchair);
ok(lawnchairdao_test.jsonDao, 'LanwchairDAO'); ok(lawnchairdao_test.jsonDao, 'LanwchairDAO');
// clear db before test // clear db before test