<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Linq.Expressions;

using LyncBillingBase.DataAccess;
using LyncBillingBase.DataModels;
using LyncBillingBase.DataMappers;
using LyncBillingBase.Helpers;
using LyncBillingBase.Repository;

namespace LyncBillingTesting
{
    class Program
    {
        public  static string tolower(string text)
        {
            return text.ToLower();
        }

        public static void Main(string[] args)
        {
            var _dbStorage = DataStorage.Instance;
            
            /***
             * Announcements Tests;
             */
            //var announcementsForRole = _dbStorage.Announcements.GetAnnouncementsForRole(2);
            //var announcementsForSite = _dbStorage.Announcements.GetAnnouncementsForSite(1);


            /***
             * SystemRoles Tests;
             */
            //var systemRoles = _dbStorage.SystemRoles.GetAll().ToList<SystemRole>();


            /***
             * Sites Tests;
             */
            //var MOA = _dbStorage.Sites.GetById(29);


            /***
             * SitesDepartments Tests;
             */
            //var sitesDepartments = _dbStorage.SitesDepartments.GetAll();
            //var MOA_Departments = _dbStorage.SitesDepartments.GetDepartmentsForSite(Convert.ToInt64(MOA.ID));


            /***
             * Gateways Tests;
             */
            //var gatewaysInfo = _dbStorage.Gateways.GetAll(IncludeDataRelations: false);
            //var allGatewaysInfo = _dbStorage.Gateways.GetAll();
            //var MOA_Gateways = _dbStorage.Gateways.GetGatewaysForSite(MOA.ID); ;


            /***
             * PhoneCalls Tests;
             */
            //var MOA_Calls = _dbStorage.PhoneCalls.GetChargeableCallsForSite(MOA.Name);


            /***
             * DelegateRoles Tests;
             */
            //var allDelegates =  _dbStorage.DelegateRoles.GetAll().ToList<DelegateRole>();
            //bool isUserDelegate = _dbStorage.DelegateRoles.IsUserDelegate("<EMAIL>");
            //bool isDepartmentDelegate = _dbStorage.DelegateRoles.IsSiteDepartmentDelegate("<EMAIL>");
            //bool isSiteDelegate = _dbStorage.DelegateRoles.IsSiteDelegate("<EMAIL>");


            /***
             * DepartmentHeadRoles Tests;
             */
            //List<DepartmentHeadRole> departmentHeads = _dbStorage.DepartmentHeads.GetAll().ToList<DepartmentHeadRole>();
            //List<SiteDepartment> siteDepartments = _dbStorage.DepartmentHeads.GetSiteDepartmentsForUser("<EMAIL>");
            //bool isDepartmentHead = _dbStorage.DepartmentHeads.IsDepartmentHead("<EMAIL>");


            /***
             * Users Tests
             */
            //var users = _dbStorage.Users.GetAll();
            var aalhour = _dbStorage.Users.GetBySipAccount("<EMAIL>");
            var aalhour_Site = _dbStorage.Users.GetSiteBySipAccount(aalhour.SipAccount);
            var aalhour_Department = _dbStorage.Users.GetDepartmentBySipAccount(aalhour.SipAccount);
            var aalhour_Colleagues = _dbStorage.Users.GetBySite(aalhour_Site);

            var unknown_sipaccount = "<EMAIL>";
            var unknown = _dbStorage.Users.GetBySipAccount("<EMAIL>");
            var unknown_Site = _dbStorage.Users.GetSiteBySipAccount("<EMAIL>");
            var unknown_Department = _dbStorage.Users.GetDepartmentBySipAccount("<EMAIL>");

            var unknown_systemroles = _dbStorage.SystemRoles.GetBySipAccount(unknown_sipaccount);
        }

    }

}<commit_msg>Removed the old UsersDataMappers test.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Linq.Expressions;

using LyncBillingBase.DataAccess;
using LyncBillingBase.DataModels;
using LyncBillingBase.DataMappers;
using LyncBillingBase.Helpers;
using LyncBillingBase.Repository;

namespace LyncBillingTesting
{
    class Program
    {
        public  static string tolower(string text)
        {
            return text.ToLower();
        }

        public static void Main(string[] args)
        {
            var _dbStorage = DataStorage.Instance;
            
            /***
             * Announcements Tests;
             */
            //var announcementsForRole = _dbStorage.Announcements.GetAnnouncementsForRole(2);
            //var announcementsForSite = _dbStorage.Announcements.GetAnnouncementsForSite(1);


            /***
             * SystemRoles Tests;
             */
            //var systemRoles = _dbStorage.SystemRoles.GetAll().ToList<SystemRole>();


            /***
             * Sites Tests;
             */
            //var MOA = _dbStorage.Sites.GetById(29);


            /***
             * SitesDepartments Tests;
             */
            //var sitesDepartments = _dbStorage.SitesDepartments.GetAll();
            //var MOA_Departments = _dbStorage.SitesDepartments.GetDepartmentsForSite(Convert.ToInt64(MOA.ID));


            /***
             * Gateways Tests;
             */
            //var gatewaysInfo = _dbStorage.Gateways.GetAll(IncludeDataRelations: false);
            //var allGatewaysInfo = _dbStorage.Gateways.GetAll();
            //var MOA_Gateways = _dbStorage.Gateways.GetGatewaysForSite(MOA.ID); ;


            /***
             * PhoneCalls Tests;
             */
            //var MOA_Calls = _dbStorage.PhoneCalls.GetChargeableCallsForSite(MOA.Name);


            /***
             * DelegateRoles Tests;
             */
            //var allDelegates =  _dbStorage.DelegateRoles.GetAll().ToList<DelegateRole>();
            //bool isUserDelegate = _dbStorage.DelegateRoles.IsUserDelegate("<EMAIL>");
            //bool isDepartmentDelegate = _dbStorage.DelegateRoles.IsSiteDepartmentDelegate("<EMAIL>");
            //bool isSiteDelegate = _dbStorage.DelegateRoles.IsSiteDelegate("<EMAIL>");


            /***
             * DepartmentHeadRoles Tests;
             */
            //List<DepartmentHeadRole> departmentHeads = _dbStorage.DepartmentHeads.GetAll().ToList<DepartmentHeadRole>();
            //List<SiteDepartment> siteDepartments = _dbStorage.DepartmentHeads.GetSiteDepartmentsForUser("<EMAIL>");
            //bool isDepartmentHead = _dbStorage.DepartmentHeads.IsDepartmentHead("<EMAIL>");


            /***
             * Users Tests
             */
            //var users = _dbStorage.Users.GetAll();
            var aalhour = _dbStorage.Users.GetBySipAccount("<EMAIL>");
            var aalhour_Site = aalhour.Site;
            var aalhour_Department = aalhour.Department;
            var aalhour_Colleagues = _dbStorage.Users.GetBySite(aalhour_Site);

            var UNKNOWN_SIPACCOUNT = "<EMAIL>";
            var unknown = _dbStorage.Users.GetBySipAccount(UNKNOWN_SIPACCOUNT);
            bool isSiteNull = (unknown == null || (unknown != null && unknown.Site == null));
            var isDepartmentNull = (unknown == null || (unknown != null && unknown.Department == null));

            var unknown_systemroles = _dbStorage.SystemRoles.GetBySipAccount(UNKNOWN_SIPACCOUNT);
        }

    }

}
{'fraction_non_alphanumeric': 0.10720758399553883, 'fraction_numerical': 0.001672940192388122, 'mean_word_length': 2.168727915194346, 'pattern_counts': {'":': 0, '<': 30, '<?xml version=': 0, '>': 30, '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': '1437154', 'n_tokens_mistral': 2062, 'n_tokens_neox': 1976, 'n_words': 296}