ArrayAssert = Y.ArrayAssert;
//-------------------------------------------------------------------------
// Base Test Suite
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// Test Case for contains()
//-------------------------------------------------------------------------
name: "Contains Assert Tests",
setUp: function(){
},
tearDown: function(){
delete this.testArray;
},
"contains() should pass when the given item exists": function () {
},
"contains() should fail when a similar item exists": function () {
},
"contains() should fail when the item doesn't exist": function() {
},
"contains() should throw a custom error message during failure": function(){
},
"test: doesNotContain()": function() {
},
"test: doesNotContainItems()": function() {
},
"test: doesNotContainMatch()": function() {
},
"test: indexOf()": function() {
},
"test: indexOf() fail": function() {
},
"test: lastIndexOf()": function() {
},
"test: lastIndexOf() fail": function() {
},
"test: doesNotContain() fail": function() {
},
"test: doesNotContainItems() fail": function() {
},
"test: doesNotContainMatch() fail": function() {
},
"test: doesNotContainMatch() fail 2": function() {
},
"test: isEmpty()": function() {
ArrayAssert.isEmpty([]);
},
"test: isNotEmpty()": function() {
},
"test: isEmpty() fail": function() {
},
"test: isNotEmpty() fail": function() {
ArrayAssert.isNotEmpty([]);
},
_should: {
fail: {
"contains() should fail when a similar item exists": new Y.Assert.Error("Value 1 (number) not found in array [1,0,false,text]."),
"contains() should throw a custom error message during failure": new Y.Assert.Error("True should not be there: Value 1 (number) not found in array [1,0,false,text]."),
"contains() should fail when the item doesn't exist": new Y.Assert.Error("Value true (boolean) not found in array [1,0,false,text]."),
"test: doesNotContain() fail": true,
"test: doesNotContainItems() fail": true,
"test: doesNotContainMatch() fail": true,
"test: indexOf() fail": true,
"test: lastIndexOf() fail": true,
"test: isEmpty() fail": true,
"test: isNotEmpty() fail": true
},
error: {
"test: doesNotContainMatch() fail 2": true
}
}
}));
//-------------------------------------------------------------------------
// Test Case for contains()
//-------------------------------------------------------------------------
name: "ContainsItems Assert Tests",
_should: {
fail: {
testNonExistingItems: new Y.Assert.Error("Value true (boolean) not found in array [1,0,false,text].")
}
},
setUp: function(){
},
tearDown: function(){
delete this.testArray;
},
testExistingItems: function () {
},
testSimilarItems: function () {
},
testNonExistingItems: function() {
}
}));
//-------------------------------------------------------------------------
// Test Case for containsMatch()
//-------------------------------------------------------------------------
name: "ContainsMatch Assert Tests",
_should: {
fail: {
}
},
setUp: function(){
},
tearDown: function(){
delete this.testArray;
},
testExistingItems: function () {
}, this.testArray);
},
testNonExistingItems: function() {
}, this.testArray);
}
}));
//-------------------------------------------------------------------------
// Test Case for itemsAreSame()
//-------------------------------------------------------------------------
name: "itemsAreSame Assert Tests",
_should: {
fail: {
}
},
setUp: function(){
},
tearDown: function(){
delete this.testArray;
},
testItemsAreSame: function () {
},
testMissingItem: function() {
},
testArrayAgainstObject: function(){
}
}));
//-------------------------------------------------------------------------
// Test Case for itemsAreEqual()
//-------------------------------------------------------------------------
name: "itemsAreEqual Assert Tests",
_should: {
fail: {
}
},
setUp: function(){
},
tearDown: function(){
delete this.testArray;
},
testItemsAreEqual: function () {
},
testMissingItem: function() {
},
testArrayAgainstObject: function(){
}
}));
//-------------------------------------------------------------------------
// Test Case for itemsAreEquivalent()
//-------------------------------------------------------------------------
name: "itemsAreEquivalent Assert Tests",
_should: {
fail: {
}
},
setUp: function(){
this.comparator = function(a,b){
return a == b;
};
},
tearDown: function(){
delete this.testArray;
delete this.comparator;
},
testItemsAreEqual: function () {
},
testMissingItem: function() {
},
testArrayAgainstObject: function(){
}
}));
});