<commit_before>import { async } from '@angular/core/testing';

import { IterationMapper, IterationUI, IterationModel } from './iteration.model';

describe('IterationMapper', () => {
    let iterationMapper: IterationMapper;
    let iterationUI: IterationUI;
    let iterationModel: IterationModel;

    iterationUI = {
        id: '',
        name: '',
        parentPath: '',
        resolvedParentPath: '',
        userActive: false,
        activeStatus: false,
        startAt: '',
        endAt: '',
        description: '',
        state: 'new',
        link: '',
        workItemCount: 0,
        type: 'iterations',
    } as IterationUI;

    iterationModel  = {
        attributes: {
          user_active: false,
          name: '',
          description: '',
          state: 'new',
          parent_path: '',
          resolved_parent_path: '',
          startAt: '',
          endAt: ''
        },
        id: '',
        links: {
            self: '',
        },
        relationships: {
            workitems: {
                meta: {
                    total: 0
                }
            }
        },
        type: 'iterations'
      } as IterationModel;
    
    beforeEach(async(() => {
        iterationMapper = new IterationMapper();
    }));

    it('Instance of IterationMapper should be created', () => {
        expect(iterationMapper).toBeTruthy();
    });
  
    it('UI Model mapped to Service Model', () => {
        expect(iterationMapper.toServiceModel(iterationUI)).toEqual(iterationModel);
    });

    it('Service Model mapped to UI Model', () => {
        expect(iterationMapper._utilMapperUIModel(iterationModel)).toEqual(iterationUI);
    });
});<commit_msg>Added test cases for iteration-mapper<commit_after>import { async } from '@angular/core/testing';

import { IterationMapper, IterationUI, IterationService } from './iteration.model';

describe('IterationMapper', () => {
    let iterationMapper: IterationMapper;
    let iterationUI: IterationUI;
    let iterationService: IterationService;

    iterationUI = {
        id: '',
        name: '',
        parentPath: '',
        resolvedParentPath: '',
        userActive: false,
        activeStatus: false,
        startAt: '',
        endAt: '',
        description: '',
        state: 'new',
        link: '',
        workItemCount: 0,
        type: 'iterations',
    } as IterationUI;

    iterationService  = {
        attributes: {
          user_active: false,
          name: '',
          description: '',
          state: 'new',
          parent_path: '',
          resolved_parent_path: '',
          startAt: '',
          endAt: ''
        },
        id: '',
        links: {
            self: '',
        },
        relationships: {
            workitems: {
                meta: {
                    total: 0
                }
            }
        },
        type: 'iterations'
      } as IterationService;
    
    beforeEach(async(() => {
        iterationMapper = new IterationMapper();
    }));

    it('should execute the canary test', () => {
        return expect(true).toBe(true)
      });
  
    it('should correctly convert to service model - 1', () => {
        expect(iterationMapper.toServiceModel(iterationUI)).toEqual(iterationService);
    });

    it('should correctly convert to UI model - 2', () => {
        expect(iterationMapper.toUIModel(iterationService)).toEqual(iterationUI);
    });
});
{'fraction_non_alphanumeric': 0.13302217036172695, 'fraction_numerical': 0.001750291715285881, 'mean_word_length': 1.8245469522240527, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '2350861', 'n_tokens_mistral': 931, 'n_tokens_neox': 924, 'n_words': 186}