d08a2495e1fbc0cf1435767148ec01129af3bcd6Luke SmithYUI.add('datasource-textschema-tests', function(Y) {
d08a2495e1fbc0cf1435767148ec01129af3bcd6Luke Smith suite = new Y.Test.Suite("Plugin.DataSourceTextSchema Test Suite"),
d08a2495e1fbc0cf1435767148ec01129af3bcd6Luke Smith textData = "foo\t0\tabc\nbar\t1\tdef\nbat\t-1\tghi";
d08a2495e1fbc0cf1435767148ec01129af3bcd6Luke Smith var ds = new Y.DataSource.Local({ source: textData }),
d08a2495e1fbc0cf1435767148ec01129af3bcd6Luke Smith success: function (e) {
d08a2495e1fbc0cf1435767148ec01129af3bcd6Luke Smith Assert.isUndefined(request, "Expected undefined request.");
d08a2495e1fbc0cf1435767148ec01129af3bcd6Luke Smith Assert.isObject(response, "Expected normalized response object.");
d08a2495e1fbc0cf1435767148ec01129af3bcd6Luke Smith Assert.isArray(response.results, "Expected results array.");
d08a2495e1fbc0cf1435767148ec01129af3bcd6Luke Smith Assert.areSame(3, response.results.length, "Expected 3 results.");
d08a2495e1fbc0cf1435767148ec01129af3bcd6Luke Smith Assert.areSame("foo", response.results[0].type, "Expected first type.");
d08a2495e1fbc0cf1435767148ec01129af3bcd6Luke Smith Assert.areSame("bat", response.results[2].type, "Expected last type.");
d08a2495e1fbc0cf1435767148ec01129af3bcd6Luke Smith Assert.areSame(0, response.results[0].age, "Expected first age.");
d08a2495e1fbc0cf1435767148ec01129af3bcd6Luke Smith Assert.areSame(-1, response.results[2].age, "Expected last age.");
d08a2495e1fbc0cf1435767148ec01129af3bcd6Luke Smith Assert.areSame("abc", response.results[0].name, "Expected first name.");
d08a2495e1fbc0cf1435767148ec01129af3bcd6Luke Smith Assert.areSame("ghi", response.results[2].name, "Expected last name.");
d08a2495e1fbc0cf1435767148ec01129af3bcd6Luke Smith}, '@VERSION@' ,{requires:['datasource-textschema', 'test', 'datatype-number-parse']});