-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGreekCategoryTest.js
39 lines (29 loc) · 1.33 KB
/
GreekCategoryTest.js
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
var Test = Test || {};
function runGreekCategoryTest() {
RunTests('GreekCategoryTest');
}
Test.GreekCategoryTest = (function () {
var _testMatches = function () {
var name = 'GreekCategoryName';
var headers = ['Greek', 'Header2', 'Residence Hall', 'Year in School'];
var greekSophomore = ['Greek1', 'val1', 'Hall', 'Sophomore'];
var greekSenior = ['Greek1', 'val1', 'Hall', 'Senior'];
var greekFreshman = ['Greek1', 'val1', 'Hall', 'Freshman'];
var nonGreekSophomore = ['no', 'val1', 'Hall', 'Sophomore'];
var nonGreekFreshman = ['no', 'val1', 'Hall', 'Freshman'];
var greekCategory = new Model.GreekCategory(name);
var matchingValueResult = greekCategory.matches(headers, greekSophomore);
Assert.equal(matchingValueResult, true);
var nonMatchingFreshmanResult = greekCategory.matches(headers, greekFreshman);
Assert.equal(nonMatchingFreshmanResult, false);
var nonGreekSophomoreResult = greekCategory.matches(headers, nonGreekSophomore);
Assert.equal(nonGreekSophomoreResult, false);
var nonGreekFreshmanResult = greekCategory.matches(headers, nonGreekFreshman);
Assert.equal(nonGreekFreshmanResult, false);
var greekSeniorResult = greekCategory.matches(headers, greekSenior);
Assert.equal(greekSeniorResult, true);
};
return {
testMatches: _testMatches
};
})();