<commit_before>/* tslint:disable:no-unused-variable */
// import { TestBed, async, inject } from '@angular/core/testing';

import { CoinReturnService } from './coin-return.service';
import { Coins } from '../models/coins';

let service: CoinReturnService;

describe('Service: CoinReturn', () => {
  beforeEach(() => {
    service = new CoinReturnService();
  });

  it('after creation should have coins with all quantities 0', () => {
    let coins = service.getCoins();
    expect(coins.nickles).toBe(0);
    expect(coins.dimes).toBe(0);
    expect(coins.quarters).toBe(0);
  });

  it('after creation should have coins with value 0', () => {
    let coins = service.getCoins();
    expect(coins.getValue()).toBe(0);
  });

  it('after ReturnCoins, coins should have proper quantities and value', () => {
    let coinsToReturn = new Coins(3, 4, 5);
    service.returnCoins(coinsToReturn);

    let coins = service.getCoins();

    expect(coins.nickles).toBe(3);
    expect(coins.dimes).toBe(4);
    expect(coins.quarters).toBe(5);
    expect(coins.getValue()).toBe(1.80);
  });
});<commit_msg>Coin Return Service: Combined value test into coins test<commit_after>/* tslint:disable:no-unused-variable */
// import { TestBed, async, inject } from '@angular/core/testing';

import { CoinReturnService } from './coin-return.service';
import { Coins } from '../models/coins';

let service: CoinReturnService;

describe('Service: CoinReturn', () => {
  beforeEach(() => {
    service = new CoinReturnService();
  });

  it('after creation should have coins with all quantities 0 and value 0', () => {
    let coins = service.getCoins();
    expect(coins.nickles).toBe(0);
    expect(coins.dimes).toBe(0);
    expect(coins.quarters).toBe(0);
    expect(coins.getValue()).toBe(0);
  });

  it('after ReturnCoins, coins should have proper quantities and value', () => {
    let coinsToReturn = new Coins(3, 4, 5);
    service.returnCoins(coinsToReturn);

    let coins = service.getCoins();

    expect(coins.nickles).toBe(3);
    expect(coins.dimes).toBe(4);
    expect(coins.quarters).toBe(5);
    expect(coins.getValue()).toBe(1.80);
  });
});
{'fraction_non_alphanumeric': 0.17212347988774557, 'fraction_numerical': 0.01403180542563143, 'mean_word_length': 3.951388888888889, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, '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': '2759596', 'n_tokens_mistral': 708, 'n_tokens_neox': 657, 'n_words': 150}