<commit_before>/*jshint node: true */
'use strict';

/*
* Name :  MapChartViewSpec.js
* Module : UnitTest
* Location : /frontend/test/unit/View
*
* History :
* Version       Date        Programmer                  Description
* =================================================================================================
* 0.1.0         2015-06-13  <NAME>   Add all attributes and all methods
*
* 0.0.1         2015-06-13  <NAME>   Initial code      
* =================================================================================================
*
*/

describe('MapChartView', function(){

	beforeEach(angular.mock.module('norris-nrti'));

	var html, element, scope, map, MapChartFactory;

	beforeEach(inject(function($rootScope, $compile, $injector) {
		MapChartFactory = $injector.get('MapChartFactory');
		map = MapChartFactory.build();
    	scope = $rootScope.$new();
    	html = angular.element('<map-chart url="http://example/map.com"></map-chart>');

    	/*scope.graphs = [
    		{ 'id' : 1, 'type' : 'MapChart', 'url' : 'http://example/map.com'},
    		{ 'id' : 2, 'type' : 'LineChart', 'url' : 'http://example/line.com'},
    		{ 'id' : 3, 'type' : 'BarChart', 'url' : 'http://example/bar.com'},
    		{ 'id' : 4, 'type' : 'Table', 'url' : 'http://example/table.com'}
    	];*/

    	scope.mapChart = map;

    	element = $compile(html)(scope);
    	scope.$digest();

  	}));

  	describe('template', function() {
		it('works fine', function() {
			var mapChart = element.find('map-chart');
			expect(mapChart).toBeDefined();
			var div = element.find('div');
			expect(div).toBeDefined();
			expect(div.text()).toEqual(map.getTitle());
		});
	});

});<commit_msg>some fixes<commit_after>/*jshint node: true */
'use strict';

/*
* Name :  MapChartViewSpec.js
* Module : UnitTest
* Location : /frontend/test/unit/View
*
* History :
* Version       Date        Programmer                  Description
* =================================================================================================
* 0.1.0         2015-06-13  <NAME>   Add all attributes and all methods
*
* 0.0.1         2015-06-13  <NAME>   Initial code      
* =================================================================================================
*
*/

describe('MapChartView', function(){

	beforeEach(angular.mock.module('norris-nrti'));

	var html, element, scope, map, MapChartFactory;
	var json = {
		'properties' : {
			'title' : 'prova'
		}
	};
	
	beforeEach(inject(function($rootScope, $compile, $injector) {
		MapChartFactory = $injector.get('MapChartFactory');
		map = MapChartFactory.build();
		map.updateProperties(json);
    	scope = $rootScope.$new();
    	html = angular.element('<map-chart url="http://example/map.com"></map-chart>');

    	/*scope.graphs = [
    		{ 'id' : 1, 'type' : 'MapChart', 'url' : 'http://example/map.com'},
    		{ 'id' : 2, 'type' : 'LineChart', 'url' : 'http://example/line.com'},
    		{ 'id' : 3, 'type' : 'BarChart', 'url' : 'http://example/bar.com'},
    		{ 'id' : 4, 'type' : 'Table', 'url' : 'http://example/table.com'}
    	];*/

    	scope.mapChart = map;

    	element = $compile(html)(scope);
    	scope.$digest();

  	}));

  	describe('template', function() {
		it('works fine', function() {
			var mapChart = element.find('map-chart');
			expect(mapChart).toBeDefined();
			var div = element.find('div');
			expect(div).toBeDefined();
			expect(div.text()).toEqual(map.getTitle());
		});
	});

});
{'fraction_non_alphanumeric': 0.2926547137073453, 'fraction_numerical': 0.015037593984962405, 'mean_word_length': 3.4922077922077923, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2224238', 'n_tokens_mistral': 1195, 'n_tokens_neox': 1083, 'n_words': 197}