3 * Copyright(c) 2006-2010 Ext JS, Inc.
5 * http://www.extjs.com/license
7 Ext.test.session.addTest( 'ArrayReader', {
10 this.reader = new Ext.data.ArrayReader({
13 {name: 'floater', type: 'float'},
15 {name: 'totalProp', type: 'integer'},
16 {name: 'bool', type: 'boolean'},
21 [ 1.23, 1, 6, true, 'hello' ]
23 this.rec1 = this.reader.readRecords(this.data1);
25 test_tearDown: function() {
30 test_TotalRecords: function() {
31 Y.Assert.areSame(this.rec1.totalRecords, 1);
33 test_Records: function() {
34 Y.Assert.areSame(this.rec1.records[0].data.floater, this.data1[0][0]);
35 Y.Assert.areSame(this.rec1.records[0].data.id, this.data1[0][1]);
36 Y.Assert.areSame(this.rec1.records[0].data.totalProp, this.data1[0][2]);
37 Y.Assert.areSame(this.rec1.records[0].data.bool, this.data1[0][3]);
38 Y.Assert.areSame(this.rec1.records[0].data.msg, this.data1[0][4]);