
var simplememolap = require('../'),
    assert = require('assert');

// createEngine defined

assert.ok(simplememolap.createEngine);
assert.equal(typeof simplememolap.createEngine, 'function');

// Create engine

var engine = simplememolap.createEngine();
assert.ok(engine);

// Dimensions

var dimcountry = engine.createDimension('country');
assert.ok(dimcountry);
assert.equal(dimcountry.name, 'country');

var dimcategory = engine.createDimension('category');
assert.ok(dimcategory);
assert.equal(dimcategory.name, 'category');

var dimproduct = engine.createDimension('product');
assert.ok(dimproduct);
assert.equal(dimproduct.name, 'product');

var dimensions = engine.getDimensions();
assert.ok(dimensions);
assert.ok(dimensions.country);
assert.ok(dimensions.category);
assert.ok(dimensions.product);

assert.equal(engine.getDimension('country'), dimensions.country);
assert.equal(engine.getDimension('category'), dimensions.category);
assert.equal(engine.getDimension('product'), dimensions.product);


@@ -1,27 +1,16 @@
 %0D%0Avar s
-implememolap
+m
  = requi
@@ -60,58 +60,92 @@
 %0D%0A%0D%0A
-// createEngine defined%0D%0A%0D%0Aassert.ok(simplememolap
+var engine;%0D%0A%0D%0Aexports%5B%22createEngine defined%22%5D = function (test) %7B%0D%0A    assert.ok(sm
 .cre
@@ -153,24 +153,28 @@
 teEngine);%0D%0A
+    
 assert.equal
@@ -182,28 +182,17 @@
 typeof s
-implememolap
+m
 .createE
@@ -216,56 +216,75 @@
 );%0D%0A
-%0D%0A// Create engine%0D%0A%0D%0Avar engine = simplememolap
+%7D;%0D%0A%0D%0Aexports%5B%22create engine%22%5D = function (test) %7B%0D%0A    engine = sm
 .cre
@@ -293,24 +293,28 @@
 eEngine();%0D%0A
+    
 assert.ok(en
@@ -325,27 +325,61 @@
 );%0D%0A
-%0D%0A// Dimensions%0D%0A%0D%0A
+%7D;%0D%0A%0D%0Aexports%5B%22dimensions%22%5D = function (test) %7B%0D%0A    
 var 
@@ -423,29 +423,31 @@
 country');%0D%0A
-asser
+    tes
 t.ok(dimcoun
@@ -445,37 +445,39 @@
 k(dimcountry);%0D%0A
-asser
+    tes
 t.equal(dimcount
@@ -496,24 +496,28 @@
 untry');%0D%0A%0D%0A
+    
 var dimcateg
@@ -555,29 +555,31 @@
 ategory');%0D%0A
-asser
+    tes
 t.ok(dimcate
@@ -578,37 +578,39 @@
 (dimcategory);%0D%0A
-asser
+    tes
 t.equal(dimcateg
@@ -631,24 +631,28 @@
 egory');%0D%0A%0D%0A
+    
 var dimprodu
@@ -688,29 +688,31 @@
 product');%0D%0A
-asser
+    tes
 t.ok(dimprod
@@ -714,29 +714,31 @@
 mproduct);%0D%0A
-asser
+    tes
 t.equal(dimp
@@ -759,26 +759,81 @@
 product');%0D%0A
-%0D%0A
+%7D;%0D%0A%0D%0Aexports%5B%22get dimensions%22%5D = function (test) %7B%0D%0A    
 var dimensio
@@ -858,29 +858,31 @@
 ensions();%0D%0A
-asser
+    tes
 t.ok(dimensi
@@ -884,29 +884,31 @@
 mensions);%0D%0A
-asser
+    tes
 t.ok(dimensi
@@ -918,29 +918,31 @@
 .country);%0D%0A
-asser
+    tes
 t.ok(dimensi
@@ -957,21 +957,23 @@
 gory);%0D%0A
-asser
+    tes
 t.ok(dim
@@ -991,23 +991,23 @@
 duct);%0D%0A
-%0D%0Aasser
+    tes
 t.equal(
@@ -1056,29 +1056,31 @@
 .country);%0D%0A
-asser
+    tes
 t.equal(engi
@@ -1131,21 +1131,23 @@
 gory);%0D%0A
-asser
+    tes
 t.equal(
@@ -1196,14 +1196,20 @@
 .product);%0D%0A
+%7D;%0D%0A%0D%0A
 %0D%0A

Refactor engine tests to use simpleunit