<commit_before>part of currency_cloud.test;

rates_api_test() {
  group('unit tests', () {
    group('rates', () {
      RatesApi ratesApi;
      MockClient mockClient;
      AuthToken authToken;

      setUp(() {
        mockClient = new MockClient();
        authToken = new AuthToken();
        ratesApi = new RatesApi(authToken);
        ratesApi.client = mockClient;
      });

      test('call to detailed with all parameters set to valid values', () async {
        var buyCurrency = 'EUR';
        var sellCurrency = 'GBP';
        var fixedSide = 'buy';
        var amount = '38.00';

        var response = {
          "settlement_cut_off_time": "2014-10-07T14:00:00Z",
          "currency_pair": "EURGBP",
          "client_buy_currency": "EUR",
          "client_sell_currency": "GBP",
          "client_buy_amount": "10000.00",
          "client_sell_amount": "7826.00",
          "fixed_side": "buy",
          "mid_market_rate": "0.7824",
          "client_rate": "0.7826",
          "partner_rate": "",
          "core_rate": "0.7826",
          "deposit_required": null,
          "deposit_amount": "0.0",
          "deposit_currency": "GBP"
        };

        var requestBody = {
          'buy_currency': buyCurrency,
          'sell_currency': sellCurrency,
          'fixed_side': fixedSide,
          'amount': amount
        };

        var uri = '/rates/detailed';

        when(mockClient.get(any, body: any)).thenReturn(new Future.value(response));
        var result = await ratesApi.detailed(buyCurrency, sellCurrency, fixedSide, amount);
        verify(mockClient.get(uri, body: requestBody)).called(1);
      });
    });
  });
}
<commit_msg>test: remove 'unit test' group<commit_after>part of currency_cloud.test;

rates_api_test() {
  group('rates', () {
    RatesApi ratesApi;
    MockClient mockClient;
    AuthToken authToken;

    setUp(() {
      mockClient = new MockClient();
      authToken = new AuthToken();
      ratesApi = new RatesApi(authToken);
      ratesApi.client = mockClient;
    });

    test('call to detailed with all parameters set to valid values', () async {
      var buyCurrency = 'EUR';
      var sellCurrency = 'GBP';
      var fixedSide = 'buy';
      var amount = '38.00';

      var response = {
        "settlement_cut_off_time": "2014-10-07T14:00:00Z",
        "currency_pair": "EURGBP",
        "client_buy_currency": "EUR",
        "client_sell_currency": "GBP",
        "client_buy_amount": "10000.00",
        "client_sell_amount": "7826.00",
        "fixed_side": "buy",
        "mid_market_rate": "0.7824",
        "client_rate": "0.7826",
        "partner_rate": "",
        "core_rate": "0.7826",
        "deposit_required": null,
        "deposit_amount": "0.0",
        "deposit_currency": "GBP"
      };

      var requestBody = {
        'buy_currency': buyCurrency,
        'sell_currency': sellCurrency,
        'fixed_side': fixedSide,
        'amount': amount
      };

      var uri = '/rates/detailed';

      when(mockClient.get(any, body: any)).thenReturn(new Future.value(response));
      await ratesApi.detailed(buyCurrency, sellCurrency, fixedSide, amount);
      verify(mockClient.get(uri, body: requestBody)).called(1);
    });
  });
}

{'fraction_non_alphanumeric': 0.1424589656240322, 'fraction_numerical': 0.03034995354598947, 'mean_word_length': 2.396424815983176, 'pattern_counts': {'":': 28, '<': 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': '7459947', 'n_tokens_mistral': 1097, 'n_tokens_neox': 1015, 'n_words': 208}