forked from agrohe21/olap4js
-
Notifications
You must be signed in to change notification settings - Fork 1
/
test-olap-dimension.html
72 lines (66 loc) · 2.2 KB
/
test-olap-dimension.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "https://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>OLAP4JS Testing-Dimension</title>
</head>
<body>
<h1>OLAP4JS Testing-Dimension</h1>
<script type="text/javascript" src="../olap.js"></script>
<script src="/pentaho/js/yui/yui/yui-min.js"></script>
<script type="text/javascript">
YUI().use('test', function (Y)
{
var suite = new Y.Test.Suite("Test of olap4js Objects-Dimension");
var testCase1 = new Y.Test.Case({
name: "Basic Dimension Object",
setUp : function () {
},
tearDown: function() {
},
"Is olap.Dimension a valid Object": function () {
Y.Assert.isFunction(olap.Dimension);
},
"Test olap.Dimension class methods getInstance": function () {
Y.Assert.isFunction(olap.Dimension.getInstance);
},
"Test olap.Dimension class methods id": function () {
Y.Assert.isNumber(olap.Dimension.id);
},
"Test olap.Dimension class methods prefix": function () {
Y.Assert.isString(olap.Dimension.prefix);
},
"Test olap.Dimension class methods instances": function () {
Y.Assert.isObject(olap.Dimension.instances);
}
});
suite.add(testCase1);
var testCase2 = new Y.Test.Case({
name: "Basic Dimension Prototype Methods",
setUp : function () {
this.Dimension = new olap.Dimension();
},
tearDown: function() {
},
"Test olap.Dimension object": function () {
Y.Assert.isInstanceOf(olap.Dimension, this.Dimension);
},
"Test olap.Dimension prototype method-getName": function () {
Y.Assert.isFunction(this.Dimension.getName);
},
"Test olap.Dimension prototype method-getHierarchies": function () {
Y.Assert.isFunction(this.Dimension.getHierarchies);
},
"Test olap.Dimension prototype method-getDimensionType": function () {
Y.Assert.isFunction(this.Dimension.getDimensionType);
}
});
suite.add(testCase2);
//add the test cases and suites
Y.Test.Runner.add(suite);
//run all tests
Y.Test.Runner.run();
})
</script>
</body>
</html>