<commit_before>/*jslint nomen: true */
'use strict';

var assert = require('assert'); // built-in node lib
var levelcache = require('level-cache');
var sinon = require('sinon');
require('mocha-sinon');
require('../common/jsInject');
var teammanagementservice = require('../TeamManagementService');
var createError = require('errno').create;
var NotFoundError = createError('NotFoundError');
NotFoundError.prototype.notFound = true;

describe("Team Management Service - Add Player to Squad Unit Tests", function() {

  var clubsdb,
      playersdb,
      squadsdb,
      squadplayersdb,
      tms,
      spyCallback,
      sandbox,
      $jsInject,
      playeremail,
      squadname,
      season,
      stubPut,
      stubGet,
      stubPlayerGet,
      stubSquadGet,
      errorNotFound;

  function injectDependenciesForService()  {
      //use in memory db, some calls are mocked anyway - but this makes it easier anyway
      clubsdb = levelcache();
      squadsdb = levelcache();
      playersdb = levelcache();
      squadplayersdb = levelcache();
      
      $jsInject = new $$jsInject();
      $jsInject.register("TeamManagementService", ["clubs", "squads", "players", "squadplayers", teammanagementservice]);
      $jsInject.register("clubs", [function() { return clubsdb; }]);
      $jsInject.register("squads", [function() { return squadsdb; }]);
      $jsInject.register("players", [function() { return playersdb; }]);
      $jsInject.register("squadplayers", [function() { return squadplayersdb; }]);
<commit_msg>Cleaning up JsLint errors<commit_after>/*jslint nomen: true */
'use strict';

var assert = require('assert'); // built-in node lib
var levelcache = require('level-cache');
var sinon = require('sinon');
require('mocha-sinon');
require('../common/jsInject');
var teammanagementservice = require('../TeamManagementService');
var createError = require('errno').create;
var NotFoundError = createError('NotFoundError');
NotFoundError.prototype.notFound = true;

describe("Team Management Service - Add Player to Squad Unit Tests", function() {

  var clubsdb,
      playersdb,
      squadsdb,
      squadplayersdb,
      tms,
      spyCallback,
      sandbox,
      $jsInject,
      playeremail,
      clubname,
      cityname,
      squadname,
      season,
      agelimit,
      stubPut,
      stubGet,
      stubPlayerGet,
      stubSquadGet,
      errorNotFound;

  function injectDependenciesForService()  {
      //use in memory db, some calls are mocked anyway - but this makes it easier anyway
      clubsdb = levelcache();
      squadsdb = levelcache();
      playersdb = levelcache();
      squadplayersdb = levelcache();
      
      $jsInject = new $$jsInject();
      $jsInject.register("TeamManagementService", ["clubs", "squads", "players", "squadplayers", teammanagementservice]);
      $jsInject.register("clubs", [function() { return clubsdb; }]);
      $jsInject.register("squads", [function() { return squadsdb; }]);
      $jsInject.register("players", [function() { return playersdb; }]);
      $jsInject.register("squadplayers", [function() { return squadplayersdb; }]);

{'fraction_non_alphanumeric': 0.13639281129653402, 'fraction_numerical': 0.0, 'mean_word_length': 3.537117903930131, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '246214', 'n_tokens_mistral': 900, 'n_tokens_neox': 945, 'n_words': 220}