Repository: climate
Updated Branches:
  refs/heads/master fb37845c2 -> fc2e0ffc0


http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/unit/controllers/WorldMapCtrlTest.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/unit/controllers/WorldMapCtrlTest.js 
b/ocw-ui/frontend/test/unit/controllers/WorldMapCtrlTest.js
deleted file mode 100644
index 805dc88..0000000
--- a/ocw-ui/frontend/test/unit/controllers/WorldMapCtrlTest.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-'use strict';
-
-describe('OCW Controllers', function() {
-
-       beforeEach(module('ocw.controllers'));
-       beforeEach(module('ocw.services'));
-
-       describe('WorldMapCtrl', function() {
-               it('should initialize the updateMap function', function() {
-                       inject(function($rootScope, $controller) {
-                               var scope = $rootScope.$new();
-                               var ctrl = $controller("WorldMapCtrl", {$scope: 
scope});
-
-                               // Set the important attributes for a fake 
dataset
-                               scope.datasets.push({shouldDisplay: true, 
latlonVals: {latMin: 0, latMax: 0, lonMin: 0, lonMax: 0}});
-                               // Don't try to add the user defined region 
since we don't have one
-                               scope.regionParams.areValid = false;
-                               // We need to fake the map object. The only 
thing we care about is faking the "addLayer" function
-                               // and the "fitBounds" functions which our map 
controllers makes use of.
-                               $rootScope.map = {addLayer: function(){}, 
fitBounds: function(){}};
-                               $rootScope.fillColors = ['#ff0000'];
-
-                               expect("rectangleGroup" in 
$rootScope).toBe(false);
-                               scope.updateMap();
-                               expect("rectangleGroup" in 
$rootScope).toBe(true);
-                       });
-               });
-       });
-});

http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/unit/directives/BootstrapModalTest.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/unit/directives/BootstrapModalTest.js 
b/ocw-ui/frontend/test/unit/directives/BootstrapModalTest.js
deleted file mode 100644
index dacc74c..0000000
--- a/ocw-ui/frontend/test/unit/directives/BootstrapModalTest.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-'use strict';
-
-describe('directives', function() {
-       beforeEach(module('ocw'));
-
-       describe('bootstrap-modal directive', function() {
-               it('should create a div element of the correct form', 
function() {
-                       inject(function($compile, $rootScope) {
-                               var element = $compile('<bootstrap-modal 
modal-id="testmodal"></bootstrap-modal>')($rootScope);
-                               expect(element.hasClass("modal")).toBeTruthy();
-                               expect(element.hasClass("hide")).toBeTruthy();
-                               
expect(element.attr("id")).toEqual('{{modalId}}');
-                       });
-               });
-
-               it('should properly wrap the interior html content' , 
function() {
-                       inject(function($compile, $rootScope) {
-                               var element = $compile('<bootstrap-modal 
modal-id="testmodal"><h3>Hello</h3></bootstrap-modal>')($rootScope);
-                               expect(element.html()).toEqual("<div 
ng-transclude=\"\"><h3 class=\"ng-scope\">Hello</h3></div>");
-                       });
-               });
-       });
-});

http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/unit/directives/OnBlurTest.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/unit/directives/OnBlurTest.js 
b/ocw-ui/frontend/test/unit/directives/OnBlurTest.js
deleted file mode 100644
index c99b2c3..0000000
--- a/ocw-ui/frontend/test/unit/directives/OnBlurTest.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-'use strict';
-
-describe('directives', function() {
-       beforeEach(module('ocw'));
-
-       describe('onBlur directive', function() {
-               it('should call the supplied function on the blur event', 
function() {
-                       inject(function($compile, $rootScope) {
-                               // Set a rootScope variable to make sure that 
on-blur calls 
-                               // the function that we pass to it.
-                               $rootScope.bogusFunction = function() {
-                                       $rootScope.test = "hi"
-                               }
-
-                               var element = $compile('<input 
on-blur="bogusFunction();" />')($rootScope);
-
-                               expect($rootScope.test).toNotBe('hi');
-                               element.trigger('blur');
-                               expect($rootScope.test).toBe('hi');
-                       });
-               });
-       });
-});

http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/unit/directives/PreviewMapTest.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/unit/directives/PreviewMapTest.js 
b/ocw-ui/frontend/test/unit/directives/PreviewMapTest.js
deleted file mode 100644
index a7991e6..0000000
--- a/ocw-ui/frontend/test/unit/directives/PreviewMapTest.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-'use strict';
-
-describe('directives', function() {
-       beforeEach(module('ocw'));
-
-       describe('preview-map directive', function() {
-               it('should set the proper class', function() {
-                       inject(function($compile, $rootScope) {
-                               $rootScope.dataset = {latlonVals: {latMax: 90, 
lonMax: 90, latMin: -90, lonMin: -90}, name: "TRMM"};
-
-                               var element = $compile('<div 
preview-map="dataset"></div>')($rootScope);
-
-                               
expect(element.hasClass("preview-map")).toBeTruthy();
-                       });
-               });
-
-               it('should set the id of the template to the name of the 
dataset', function() {
-                       inject(function($compile, $rootScope) {
-                               $rootScope.dataset = {latlonVals: {latMax: 90, 
lonMax: 90, latMin: -90, lonMin: -90}, name: "TRMM"};
-
-                               var element = $compile('<div 
preview-map="dataset"></div>')($rootScope);
-
-                               
expect(element.attr('id')).toEqual("{{dataset.name}}");
-                       });
-               });
-       });
-});

http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/unit/filters/ISODateToMiddleEndianTest.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/unit/filters/ISODateToMiddleEndianTest.js 
b/ocw-ui/frontend/test/unit/filters/ISODateToMiddleEndianTest.js
deleted file mode 100644
index 9228765..0000000
--- a/ocw-ui/frontend/test/unit/filters/ISODateToMiddleEndianTest.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-'use strict';
-
-describe('OCW Filters', function() {
-       beforeEach(module('ocw.filters'));
-
-       describe('ISODateToMiddleEndian', function() {
-               it('should replace the ISO Date/Time stamp', function() {
-                       inject(function($filter) {
-                               var filter = $filter('ISODateToMiddleEndian');
-                               
expect(filter('2012-01-02T00:00:00')).toEqual('01/02/2012');
-                       });
-               });
-
-               it('should replace the modified ISO Date/Time stamp', 
function() {
-                       inject(function($filter) {
-                               var filter = $filter('ISODateToMiddleEndian');
-                               expect(filter('2012-01-02 
00:00:00')).toEqual('01/02/2012');
-                       });
-               });
-
-               it('should replace the ISO Date stamp', function() {
-                       inject(function($filter) {
-                               var filter = $filter('ISODateToMiddleEndian');
-                               
expect(filter('2012-01-02')).toEqual('01/02/2012');
-                       });
-               });
-
-               it('should replace leading and trailing whitespace', function() 
{
-                       inject(function($filter) {
-                               var filter = $filter('ISODateToMiddleEndian');
-                               expect(filter('      2012-01-02T00:00:00    
')).toEqual('01/02/2012');
-                       });
-               });
-
-               it('should do nothing when the date format has the incorrect 
number of hyphens', function() {
-                       inject(function($filter) {
-                               var filter = $filter('ISODateToMiddleEndian');
-                               
expect(filter('2012-234T234')).toEqual('2012-234T234')
-                       });
-               });
-
-               it('should do nothing when the date format has no hyphens', 
function() {
-                       inject(function($filter) {
-                               var filter = $filter('ISODateToMiddleEndian');
-                               
expect(filter('2012234T234')).toEqual('2012234T234')
-                       });
-               });
-       });
-});

http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/unit/services/EvaluationSettingsTest.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/unit/services/EvaluationSettingsTest.js 
b/ocw-ui/frontend/test/unit/services/EvaluationSettingsTest.js
deleted file mode 100644
index b8d021a..0000000
--- a/ocw-ui/frontend/test/unit/services/EvaluationSettingsTest.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-'use strict';
-
-describe('OCW Services', function() {
-
-       beforeEach(module('ocw.services'));
-
-       describe('EvaluationSettings', function() {
-
-               it('should initialize the evaluationSettings service', 
function() {
-                       inject(function(evaluationSettings) {
-                               expect(evaluationSettings).not.toEqual(null);
-                       });
-               });
-
-               it('should provide a getSettings function', function() {
-                       inject(function(evaluationSettings) {
-                               
expect(evaluationSettings.getSettings()).not.toEqual(null);
-                       })
-               })
-       });
-});

http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/unit/services/RegionSelectParamsTest.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/test/unit/services/RegionSelectParamsTest.js 
b/ocw-ui/frontend/test/unit/services/RegionSelectParamsTest.js
deleted file mode 100644
index 2b90ec3..0000000
--- a/ocw-ui/frontend/test/unit/services/RegionSelectParamsTest.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-'use strict';
-
-describe('OCW Services', function() {
-
-       beforeEach(module('ocw.services'));
-
-       describe('RegionSelectParams', function() {
-
-               it('should initialize the regionSelectParams service', 
function() {
-                       inject(function(regionSelectParams) {
-                               expect(regionSelectParams).not.toEqual(null);
-                       });
-               });
-
-               it('should provide the getParameters function', function() {
-                       inject(function(regionSelectParams) {
-                               
expect(regionSelectParams.getParameters()).not.toEqual(null);
-                       });
-               });
-       });
-});
-

http://git-wip-us.apache.org/repos/asf/climate/blob/652ea657/ocw-ui/frontend/test/unit/services/SelectedDatasetInfomationTest.js
----------------------------------------------------------------------
diff --git 
a/ocw-ui/frontend/test/unit/services/SelectedDatasetInfomationTest.js 
b/ocw-ui/frontend/test/unit/services/SelectedDatasetInfomationTest.js
deleted file mode 100644
index aeada3d..0000000
--- a/ocw-ui/frontend/test/unit/services/SelectedDatasetInfomationTest.js
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http: *www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
-**/
-
-'use strict';
-
-describe('OCW Services', function() {
-
-       beforeEach(module('ocw.services'));
-
-       describe('SelectedDatasetInformation', function() {
-
-               it('should initialize the selectedDatasetInformation service', 
function() {
-                       inject(function(selectedDatasetInformation) {
-                               
expect(selectedDatasetInformation).not.toEqual(null);
-                       });
-               });
-
-               it('should provide the getDatasets function', function() {
-                       inject(function(selectedDatasetInformation) {
-                               
expect(selectedDatasetInformation.getDatasets()).not.toEqual(null);
-                       });
-               });
-
-               it('should provide the getDatasetCount function', function() {
-                       inject(function(selectedDatasetInformation) {
-                               
expect(selectedDatasetInformation.getDatasetCount()).toEqual(0);
-                       });
-               });
-
-               it('should provide the addDataset function', function() {
-                       inject(function(selectedDatasetInformation) {
-                               selectedDatasetInformation.addDataset({});
-                               
expect(selectedDatasetInformation.getDatasetCount()).toEqual(1);
-                       });
-               });
-
-               it('should set the shouldDisplay attribute when adding a 
dataset', function() {
-                       inject(function(selectedDatasetInformation) {
-                               selectedDatasetInformation.addDataset({});
-                               
expect(selectedDatasetInformation.getDatasets()[0].shouldDisplay).toBe(false);
-                       });
-               });
-
-               it('should set the regrid attribute when adding a dataset', 
function() {
-                       inject(function(selectedDatasetInformation) {
-                               selectedDatasetInformation.addDataset({});
-                               
expect(selectedDatasetInformation.getDatasets()[0].regrid).toBe(false);
-                       });
-               });
-
-               it('should provide the removeDataset function', function() {
-                       inject(function(selectedDatasetInformation) {
-                               selectedDatasetInformation.addDataset(1);
-                               selectedDatasetInformation.addDataset(2);
-
-                               
expect(selectedDatasetInformation.getDatasets()[0]).toEqual(1);
-                               selectedDatasetInformation.removeDataset(0);
-                               
expect(selectedDatasetInformation.getDatasets()[0]).toEqual(2);
-                       });
-               });
-
-               it('should provide the clearDatasets function', function() {
-                       inject(function(selectedDatasetInformation) {
-                               selectedDatasetInformation.addDataset({});
-                               
expect(selectedDatasetInformation.getDatasetCount()).toEqual(1);
-
-                               selectedDatasetInformation.clearDatasets();
-                               
expect(selectedDatasetInformation.getDatasetCount()).toEqual(0);
-                       });
-               });
-       });
-});
-
-

Reply via email to