<commit_before>'use strict';

describe('colorsService test', function(){

    describe('when I call selectColors', function(){
        beforeEach(module('BrickInventoryApp.services'));
        it('returns a list of color tuples', inject(function(colorsService){

          var brickList = [ { colorId: 5 }, { colorId: 0 } ];

          expect( colorsService.selectColors(brickList) ).toEqual( [ { name: "red", id:5}, { name: "undefined", id:0 } ]) ;

        }))
    })


    describe('when I call selectColorIds', function(){
        beforeEach(module('BrickInventoryApp.services'));
        it('returns 5 0', inject(function(colorsService){

          var brickList = [ { colorId: 5 }, { colorId: 0 } ];

          expect( colorsService.selectColorIds(brickList) ).toEqual( [ 5, 0 ] ) ;

        }))
    })


    describe('when I call getColorName(5)', function(){
        beforeEach(module('BrickInventoryApp.services'));
        it('returns red', inject(function(colorsService){

          expect( colorsService.getColorName(5) ).toEqual( "red" ) ;

        }))
    })

    describe('when I call fillColorNames', function(){
        beforeEach(module('BrickInventoryApp.services'));
        it('th bricks have colorNames', inject(function(colorsService){

          var brickList = [ { colorId: 5 } ];
          colorsService.fillColorNames(brickList)
          expect( brickList ).toEqual(  [ { colorId: 5, colorName: "red" } ] ) ;

        }))
    })

});

describe('shapesService test', function(){

    describe('when I call selectShapes', function(){
        beforeEach(module('BrickInventoryApp.services'));
        it('returns a list of shapes', inject(function(shapesService){<commit_msg>fixed test after capitalisation and added a test for uniqueness<commit_after>'use strict';

describe('colorsService test', function(){

    describe('when I call selectColors', function(){
        beforeEach(module('BrickInventoryApp.services'));
        it('returns a list of color tuples', inject(function(colorsService){

          var brickList = [ { colorId: 5 }, { colorId: 0 } ];

          expect( colorsService.selectColors(brickList) ).toEqual( [ { name: "Red", id:5}, { name: "Undefined", id:0 } ]) ;

        }))
    })


    describe('when I call selectColorIds', function(){
        beforeEach(module('BrickInventoryApp.services'));
        it('returns 5 0', inject(function(colorsService){

          var brickList = [ { colorId: 5 }, { colorId: 5 }, { colorId: 0 } ];

          expect( colorsService.selectColorIds(brickList) ).toEqual( [ 5, 0 ] ) ;

        }))
    })


    describe('when I call getColorName(5)', function(){
        beforeEach(module('BrickInventoryApp.services'));
        it('returns Red', inject(function(colorsService){

          expect( colorsService.getColorName(5) ).toEqual( "Red" ) ;

        }))
    })

    describe('when I call fillColorNames', function(){
        beforeEach(module('BrickInventoryApp.services'));
        it('th bricks have colorNames', inject(function(colorsService){

          var brickList = [ { colorId: 5 } ];
          colorsService.fillColorNames(brickList)
          expect( brickList ).toEqual(  [ { colorId: 5, colorName: "Red" } ] ) ;

        }))
    })

});

describe('shapesService test', function(){

    describe('when I call selectShapes', function(){
        beforeEach(module('BrickInventoryApp.services'));
        it('returns a list of shapes', inject(function(shapesService){
{'fraction_non_alphanumeric': 0.1488747836122331, 'fraction_numerical': 0.008366993652625505, 'mean_word_length': 3.1372315035799523, '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': '5313545', 'n_tokens_mistral': 1016, 'n_tokens_neox': 957, 'n_words': 220}